Search in sources :

Example 26 with JsonProject

use of io.lumeer.api.dto.JsonProject in project engine by Lumeer.

the class ProjectFacadeIT method createProjectWithStrangerPermissions.

private Project createProjectWithStrangerPermissions(final String code) {
    Project project = new JsonProject(code, NAME, ICON, COLOR, null, null);
    project.getPermissions().updateUserPermissions(USER_PERMISSION, new SimplePermission(STRANGER_USER, Collections.singleton(Role.MANAGE)));
    project.getPermissions().updateGroupPermissions(GROUP_PERMISSION);
    return projectDao.createProject(project);
}
Also used : JsonProject(io.lumeer.api.dto.JsonProject) Project(io.lumeer.api.model.Project) JsonProject(io.lumeer.api.dto.JsonProject) SimplePermission(io.lumeer.core.model.SimplePermission)

Aggregations

JsonProject (io.lumeer.api.dto.JsonProject)26 Project (io.lumeer.api.model.Project)25 Organization (io.lumeer.api.model.Organization)15 JsonOrganization (io.lumeer.api.dto.JsonOrganization)14 JsonPermission (io.lumeer.api.dto.JsonPermission)14 JsonPermissions (io.lumeer.api.dto.JsonPermissions)13 User (io.lumeer.api.model.User)13 AuthenticatedUser (io.lumeer.core.AuthenticatedUser)13 Before (org.junit.Before)13 Test (org.junit.Test)9 JsonCollection (io.lumeer.api.dto.JsonCollection)8 Response (javax.ws.rs.core.Response)7 SoftAssertions (org.assertj.core.api.SoftAssertions)4 SimplePermission (io.lumeer.core.model.SimplePermission)3 Entity (javax.ws.rs.client.Entity)3 LinkType (io.lumeer.api.model.LinkType)2 Permission (io.lumeer.api.model.Permission)1 Permissions (io.lumeer.api.model.Permissions)1 Resource (io.lumeer.api.model.Resource)1 Role (io.lumeer.api.model.Role)1