Skip to content

Commit

Permalink
added regular project editor role
Browse files Browse the repository at this point in the history
  • Loading branch information
soimugeo committed Jun 26, 2024
1 parent 4a22c5c commit 8bd8901
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -164,17 +164,17 @@ private Collection<Subject> getSubjectsWithAccessToResource(Resource resource, O
Query query = query(where(PROJECT_ID).is(projectId));
action.ifPresent(a -> query.addCriteria(where(ACTION_CLOSURE).in(a.toString())));
return mongoTemplate.find(query, RoleAssignment.class)
.stream()
.map(ra -> {
Optional<String> userName = ra.getUserName();
if (userName.isPresent()) {
return Subject.forUser(userName.get());
}
else {
return Subject.forAnySignedInUser();
}
})
.collect(toList());
.stream()
.map(ra -> {
Optional<String> userName = ra.getUserName();
if (userName.isPresent()) {
return Subject.forUser(userName.get());
}
else {
return Subject.forAnySignedInUser();
}
})
.collect(toList());
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,16 @@ public enum BuiltInRole {
DELETE_DATATYPE,
REVERT_CHANGES),

REGULAR_PROJECT_EDITOR(OBJECT_COMMENTER,
EDIT_ONTOLOGY,
EDIT_ONTOLOGY_ANNOTATIONS,
CREATE_CLASS,
MERGE_ENTITIES,
CREATE_PROPERTY,
CREATE_INDIVIDUAL,
CREATE_DATATYPE,
REVERT_CHANGES),

LAYOUT_EDITOR(ADD_OR_REMOVE_PERSPECTIVE,
ADD_OR_REMOVE_VIEW),

Expand Down

0 comments on commit 8bd8901

Please sign in to comment.