aboutsummaryrefslogtreecommitdiff
path: root/gn3/auth/authorisation/roles.py
diff options
context:
space:
mode:
Diffstat (limited to 'gn3/auth/authorisation/roles.py')
-rw-r--r--gn3/auth/authorisation/roles.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/gn3/auth/authorisation/roles.py b/gn3/auth/authorisation/roles.py
index 8435c40..397ad80 100644
--- a/gn3/auth/authorisation/roles.py
+++ b/gn3/auth/authorisation/roles.py
@@ -3,6 +3,7 @@ from uuid import UUID, uuid4
from typing import Iterable, NamedTuple
from gn3.auth import db
+from gn3.auth.authentication.checks import authenticated_p
from .checks import authorised_p
from .privileges import Privilege
@@ -13,6 +14,7 @@ class Role(NamedTuple):
role_name: str
privileges: Iterable[Privilege]
+@authenticated_p
@authorised_p(("create-role",), error_message="Could not create role")
def create_role(
cursor: db.DbCursor, role_name: str,