Skip to content

Commit

Permalink
fix: allow admins to view tasks
Browse files Browse the repository at this point in the history
  • Loading branch information
satikaj committed May 28, 2024
1 parent a07e452 commit 24bbec5
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
16 changes: 16 additions & 0 deletions app/models/task.rb
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,20 @@ def self.permissions
:assess_extension,
:request_extension
]
# What can admins do with tasks?
admin_role_permissions = [
:get,
:get_submission,
:view_plagiarism,
:get_discussion
]
# What can auditors do with tasks?
auditor_role_permissions = [
:get,
:get_submission,
:view_plagiarism,
:get_discussion
]
# What can nil users do with tasks?
nil_role_permissions = []

Expand All @@ -57,6 +71,8 @@ def self.permissions
student: student_role_permissions,
tutor: tutor_role_permissions,
convenor: convenor_role_permissions,
admin: admin_role_permissions,
auditor: auditor_role_permissions,
nil: nil_role_permissions
}
end
Expand Down
2 changes: 2 additions & 0 deletions app/models/unit.rb
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ def self.permissions
:employ_staff,
:add_tutorial,
:add_task_def,
:provide_feedback,
:download_stats,
:download_unit_csv,
:download_grades,
Expand All @@ -73,6 +74,7 @@ def self.permissions
auditor_role_permissions = [
:get_unit,
:get_students,
:provide_feedback,
:download_stats,
:download_unit_csv,
:download_grades
Expand Down

0 comments on commit 24bbec5

Please sign in to comment.