Skip to content

Commit f79540d

Browse files
committed
Add a staff_area_access permission
We'll eventually replace checks against the `StaffAreaAdministrator` role with checks against this permission.
1 parent b239aed commit f79540d

File tree

3 files changed

+4
-0
lines changed

3 files changed

+4
-0
lines changed

jobserver/authorization/permissions.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
repo_sign_off_with_outputs = "repo_sign_off_with_outputs"
1111
snapshot_create = "snapshot_create"
1212
snapshot_publish = "snapshot_publish"
13+
staff_area_access = "staff_area_access"
1314
unreleased_outputs_view = "unreleased_outputs_view"
1415
user_manage = "user_manage"
1516
workspace_archive = "workspace_archive"

jobserver/authorization/roles.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
repo_sign_off_with_outputs,
1212
snapshot_create,
1313
snapshot_publish,
14+
staff_area_access,
1415
unreleased_outputs_view,
1516
user_manage,
1617
workspace_archive,
@@ -33,6 +34,7 @@ class StaffAreaAdministrator:
3334
backend_manage,
3435
org_create,
3536
user_manage,
37+
staff_area_access,
3638
]
3739

3840

tests/unit/jobserver/api/test_jobs.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -889,6 +889,7 @@ def test_userapidetail_success(api_rf, project_membership):
889889
"application_manage",
890890
"backend_manage",
891891
"org_create",
892+
"staff_area_access",
892893
"user_manage",
893894
]
894895

0 commit comments

Comments
 (0)