use of io.lumeer.api.dto.JsonOrganization in project engine by Lumeer.
the class GroupFacadeIT method configure.
@Before
public void configure() {
JsonOrganization organization1 = new JsonOrganization();
organization1.setCode("LMR");
organization1.setPermissions(new JsonPermissions());
organization1.getPermissions().updateUserPermissions(new JsonPermission(USER, Role.toStringRoles(new HashSet<>(Arrays.asList(Role.WRITE, Role.READ, Role.MANAGE)))));
organization = organizationDao.createOrganization(organization1);
workspaceKeeper.setOrganization(organization.getCode());
groupDao.createGroupsRepository(organization);
groupDao.setOrganization(organization);
}
use of io.lumeer.api.dto.JsonOrganization in project engine by Lumeer.
the class GroupFacadeIT method setOrganizationWithoutPermissions.
private void setOrganizationWithoutPermissions() {
JsonOrganization organization3 = new JsonOrganization();
organization3.setCode("RML");
organization3.setPermissions(new JsonPermissions());
Organization organizationNotPermission = organizationDao.createOrganization(organization3);
workspaceKeeper.setOrganization(organizationNotPermission.getCode());
groupDao.createGroupsRepository(organizationNotPermission);
groupDao.setOrganization(organizationNotPermission);
}
use of io.lumeer.api.dto.JsonOrganization in project engine by Lumeer.
the class OrganizationFacadeIT method createOrganizationWithStrangerPermissions.
private void createOrganizationWithStrangerPermissions(final String code) {
Organization organization = new JsonOrganization(code, NAME, ICON, COLOR, null, null);
organization.getPermissions().updateUserPermissions(USER_PERMISSION, new SimplePermission(STRANGER_USER, Collections.singleton(Role.MANAGE)));
organization.getPermissions().updateGroupPermissions(GROUP_PERMISSION);
organizationDao.createOrganization(organization);
}
use of io.lumeer.api.dto.JsonOrganization in project engine by Lumeer.
the class OrganizationFacadeIT method createOrganization.
private String createOrganization(final String code) {
Organization organization = new JsonOrganization(code, NAME, ICON, COLOR, null, null);
organization.getPermissions().updateUserPermissions(USER_PERMISSION);
organization.getPermissions().updateGroupPermissions(GROUP_PERMISSION);
return organizationDao.createOrganization(organization).getId();
}
use of io.lumeer.api.dto.JsonOrganization in project engine by Lumeer.
the class OrganizationFacadeIT method createOrganizationWithReadOnlyPermissions.
private void createOrganizationWithReadOnlyPermissions(final String code) {
Organization organization = new JsonOrganization(code, NAME, ICON, COLOR, null, null);
organization.getPermissions().updateUserPermissions(USER_READONLY_PERMISSION, STRANGER_PERMISSION);
organization.getPermissions().updateGroupPermissions(GROUP_PERMISSION);
organizationDao.createOrganization(organization);
}
Aggregations