use of io.lumeer.storage.mongodb.model.embedded.MorphiaPermissions in project engine by Lumeer.
the class MorphiaViewDaoTest method prepareView.
private MorphiaView prepareView() {
MorphiaView view = new MorphiaView();
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 MorphiaOrganizationDaoTest method prepareOrganization.
private MorphiaOrganization prepareOrganization(String code) {
MorphiaOrganization organization = new MorphiaOrganization();
organization.setCode(code);
organization.setName(NAME);
organization.setColor(COLOR);
organization.setIcon(ICON);
organization.setPermissions(new MorphiaPermissions(PERMISSIONS));
return organization;
}
use of io.lumeer.storage.mongodb.model.embedded.MorphiaPermissions in project engine by Lumeer.
the class ProjectFacadeIT method configureProject.
@Before
public void configureProject() {
MorphiaOrganization organization = new MorphiaOrganization();
organization.setCode(ORGANIZATION_CODE);
organization.setPermissions(new MorphiaPermissions());
organization.getPermissions().updateUserPermissions(new MorphiaPermission(USER, Role.toStringRoles(new HashSet<>(Arrays.asList(Role.WRITE, Role.READ, Role.MANAGE)))));
Organization storedOrganization = organizationDao.createOrganization(organization);
projectDao.setOrganization(storedOrganization);
User user = new User(USER);
userDao.createUser(user);
workspaceKeeper.setOrganization(ORGANIZATION_CODE);
}
use of io.lumeer.storage.mongodb.model.embedded.MorphiaPermissions in project engine by Lumeer.
the class ProjectServiceIT method configureProject.
@Before
public void configureProject() {
MorphiaOrganization organization = new MorphiaOrganization();
organization.setCode(ORGANIZATION_CODE);
organization.setPermissions(new MorphiaPermissions());
organization.getPermissions().updateUserPermissions(new MorphiaPermission(USER, Role.toStringRoles(new HashSet<>(Arrays.asList(Role.WRITE, Role.READ, Role.MANAGE)))));
Organization storedOrganization = organizationDao.createOrganization(organization);
projectDao.setOrganization(storedOrganization);
User user = new User(USER);
userDao.createUser(user);
}
use of io.lumeer.storage.mongodb.model.embedded.MorphiaPermissions in project engine by Lumeer.
the class ViewFacadeIT 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);
workspaceKeeper.setWorkspace(ORGANIZATION_CODE, PROJECT_CODE);
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);
}
Aggregations