Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Queue
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
EIP
Labrador
Queue
Commits
178c7246
Commit
178c7246
authored
Sep 9, 2020
by
Otto Visser
Browse files
Options
Downloads
Plain Diff
Merge branch '303-manager-cannot-update-student-assistant' into 'development'
Resolve "Manager cannot update student/assistant" Closes
#303
See merge request
!385
parents
2faa3342
3eba2519
Branches
Branches containing commit
Tags
Tags containing commit
2 merge requests
!387
Development
,
!385
Resolve "Manager cannot update student/assistant"
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main/java/nl/tudelft/ewi/queue/service/PermissionService.java
+3
-3
3 additions, 3 deletions
.../java/nl/tudelft/ewi/queue/service/PermissionService.java
with
3 additions
and
3 deletions
src/main/java/nl/tudelft/ewi/queue/service/PermissionService.java
+
3
−
3
View file @
178c7246
...
...
@@ -102,14 +102,14 @@ public class PermissionService {
public
boolean
canUpdateParticipant
(
Object
principal
,
Long
courseId
,
Long
participantId
)
{
User
user
=
getUser
(
principal
);
User
participant
=
getRole
(
participantId
)
.
getUser
()
;
Role
participant
Role
=
getRole
(
participantId
);
Course
course
=
courseRepository
.
findByIdOrThrow
(
courseId
);
return
user
.
isAdmin
()
||
user
.
teaches
(
course
)
||
user
.
manages
(
course
)
&&
!
participant
.
teaches
(
course
)
||
participant
.
getId
().
equals
(
user
.
getId
());
user
.
manages
(
course
)
&&
!
(
participant
Role
instanceof
Teacher
)
||
participant
Role
.
getUser
()
.
getId
().
equals
(
user
.
getId
());
}
public
boolean
canAddParticipant
(
Object
principal
,
Long
courseId
,
String
participantRole
)
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
sign in
to comment