use of io.lumeer.storage.mongodb.model.embedded.MorphiaPermissions in project engine by Lumeer.
the class MorphiaProjectDaoTest method prepareProject.
private MorphiaProject prepareProject(String code) {
MorphiaProject project = new MorphiaProject();
project.setCode(code);
project.setName(NAME);
project.setColor(COLOR);
project.setIcon(ICON);
project.setPermissions(new MorphiaPermissions(PERMISSIONS));
return project;
}
use of io.lumeer.storage.mongodb.model.embedded.MorphiaPermissions in project engine by Lumeer.
the class MongoViewDaoTest method prepareView.
private JsonView prepareView() {
JsonView view = new JsonView();
view.setCode(CODE);
view.setName(NAME);
view.setColor(COLOR);
view.setIcon(ICON);
view.setPermissions(new MorphiaPermissions(PERMISSIONS));
view.setQuery(QUERY);
view.setPerspective(PERSPECTIVE);
view.setConfig(CONFIG);
return view;
}
use of io.lumeer.storage.mongodb.model.embedded.MorphiaPermissions in project engine by Lumeer.
the class MorphiaCollectionDaoTest method prepareCollection.
private MorphiaCollection prepareCollection(String code, String name) {
MorphiaCollection collection = new MorphiaCollection();
collection.setCode(code);
collection.setName(name);
collection.setColor(COLOR);
collection.setIcon(ICON);
collection.setPermissions(new MorphiaPermissions(PERMISSIONS));
collection.setAttributes(ATTRIBUTES);
collection.setDocumentsCount(DOCUMENTS_COUNT);
collection.setLastTimeUsed(LAST_TIME_USED);
return collection;
}
use of io.lumeer.storage.mongodb.model.embedded.MorphiaPermissions in project engine by Lumeer.
the class ViewServiceIT method configureProject.
@Before
public void configureProject() {
MorphiaOrganization organization = new MorphiaOrganization();
organization.setCode(ORGANIZATION_CODE);
organization.setPermissions(new MorphiaPermissions());
Organization storedOrganization = organizationDao.createOrganization(organization);
projectDao.setOrganization(storedOrganization);
User user = new User(USER);
userDao.createUser(user);
MorphiaProject project = new MorphiaProject();
project.setCode(PROJECT_CODE);
project.setPermissions(new MorphiaPermissions());
Project storedProject = projectDao.createProject(project);
viewDao.setProject(storedProject);
}
use of io.lumeer.storage.mongodb.model.embedded.MorphiaPermissions in project engine by Lumeer.
the class ProjectServicePermissionsIT method configureProject.
@Before
public void configureProject() {
MorphiaOrganization organization = new MorphiaOrganization();
organization.setCode(organizationCode);
organization.setName(organizationName);
organization.setPermissions(new MorphiaPermissions());
organization.getPermissions().updateUserPermissions(new MorphiaPermission(userEmail, Role.toStringRoles(new HashSet<>(Arrays.asList(Role.WRITE, Role.READ, Role.MANAGE)))));
Organization storedOrganization = organizationDao.createOrganization(organization);
projectDao.setOrganization(storedOrganization);
workspaceKeeper.setOrganization(organizationCode);
User user = new User(userEmail);
userDao.createUser(user);
}
Aggregations