Skip to content

Commit

Permalink
Adjusting permissions for student-supervisors, allowing them to send …
Browse files Browse the repository at this point in the history
…group invitations.
  • Loading branch information
krulis-martin committed Oct 17, 2023
1 parent c7f2542 commit 97b8a07
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 7 deletions.
1 change: 0 additions & 1 deletion app/V1Module/presenters/RegistrationPresenter.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
*/
class RegistrationPresenter extends BasePresenter
{

/**
* @var Logins
* @inject
Expand Down
19 changes: 16 additions & 3 deletions app/config/permissions.neon
Original file line number Diff line number Diff line change
Expand Up @@ -166,16 +166,24 @@ permissions:

- allow: true
resource: group
role: supervisor
role: supervisor-student
actions:
- addStudent # requires permissions to read all users' private data
- inviteStudents # create future invitations, that the students can use to join
- editInvitations # add, update, and remove invitation links (for already registered users)
- removeStudent
conditions:
- group.isSupervisor
- group.isNotArchived

- allow: true
resource: group
role: supervisor
actions:
- addStudent # requires permissions to read all users' private data
conditions:
- group.isSupervisor
- group.isNotArchived

- allow: true
resource: group
role: supervisor-student
Expand Down Expand Up @@ -327,13 +335,18 @@ permissions:
- listPendingReviews
conditions: user.isSameUser

- allow: true
role: supervisor-student
resource: user
actions:
- inviteForRegistration

- allow: true
role: supervisor
resource: user
actions:
- viewDetail
- viewAll
- inviteForRegistration

##########################
# Assignment permissions #
Expand Down
1 change: 0 additions & 1 deletion app/model/view/UserViewFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
*/
class UserViewFactory
{

/**
* @var IUserPermissions
*/
Expand Down
4 changes: 2 additions & 2 deletions recodex-api.spec
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
%define short_name api
%define install_dir /opt/%{name}
%define version 2.9.0
%define unmangled_version c23ec53358e1f91fe7f29185cd3336b742634fe3
%define release 1
%define unmangled_version c7f2542373bb26f0ecccf8b776514419801e2e77
%define release 2

Summary: ReCodEx core API component
Name: %{name}
Expand Down

0 comments on commit 97b8a07

Please sign in to comment.