Skip to content
Snippets Groups Projects
Commit b597d1f8 authored by uhensler's avatar uhensler
Browse files

OO-4285: Default current course roles order

Owner has the highest priority, then coach and then participant
parent 1b1cf874
No related branches found
No related tags found
No related merge requests found
......@@ -43,12 +43,10 @@ public class SingleRoleRepositoryEntrySecurity implements RepositoryEntrySecurit
}
private Role getDefaultRole() {
if (wrappedSecurity.isParticipant()) {
return Role.participant;
if (wrappedSecurity.isEntryAdmin() || wrappedSecurity.isPrincipal() || wrappedSecurity.isMasterCoach()) {
return Role.owner;
} else if (wrappedSecurity.isCoach() || wrappedSecurity.isMasterCoach()) {
return Role.coach;
} if (wrappedSecurity.isEntryAdmin() || wrappedSecurity.isPrincipal() || wrappedSecurity.isMasterCoach()) {
return Role.owner;
}
return Role.participant;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment