aboutsummaryrefslogtreecommitdiff
path: root/tests/unit/auth/fixtures
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi2023-04-25 09:42:36 +0300
committerFrederick Muriuki Muriithi2023-04-25 09:42:36 +0300
commit8471ed1187a8abc5e28207776c5f49a59ba24b92 (patch)
treee5df42404938c078313b5b039ab0269b437bb49f /tests/unit/auth/fixtures
parent3e2198e39bc229553d118f367fbd2f9932a9a76b (diff)
downloadgenenetwork3-8471ed1187a8abc5e28207776c5f49a59ba24b92.tar.gz
auth: Roles: Check for editability
Some roles should not be user-editable, and as such, we need to check before allowing any edits on such roles. This commit makes that possible.
Diffstat (limited to 'tests/unit/auth/fixtures')
-rw-r--r--tests/unit/auth/fixtures/role_fixtures.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/unit/auth/fixtures/role_fixtures.py b/tests/unit/auth/fixtures/role_fixtures.py
index cde3d96..ee86aa2 100644
--- a/tests/unit/auth/fixtures/role_fixtures.py
+++ b/tests/unit/auth/fixtures/role_fixtures.py
@@ -8,12 +8,13 @@ from gn3.auth.authorisation.roles import Role
from gn3.auth.authorisation.privileges import Privilege
RESOURCE_READER_ROLE = Role(
- uuid.UUID("c3ca2507-ee24-4835-9b31-8c21e1c072d3"), "resource_reader",
+ uuid.UUID("c3ca2507-ee24-4835-9b31-8c21e1c072d3"), "resource_reader", True,
(Privilege("group:resource:view-resource",
"view a resource and use it in computations"),))
RESOURCE_EDITOR_ROLE = Role(
- uuid.UUID("89819f84-6346-488b-8955-86062e9eedb7"), "resource_editor", (
+ uuid.UUID("89819f84-6346-488b-8955-86062e9eedb7"), "resource_editor", True,
+ (
Privilege("group:resource:view-resource",
"view a resource and use it in computations"),
Privilege("group:resource:edit-resource", "edit/update a resource")))