aboutsummaryrefslogtreecommitdiff
path: root/gn_auth/auth/authorisation/roles
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi2024-06-10 13:41:52 -0500
committerFrederick Muriuki Muriithi2024-06-10 16:45:12 -0500
commit99023088e70c6db684785ab6a1a8b11331058efd (patch)
tree2db8e98781dfb429b512e555c56c423f97b02627 /gn_auth/auth/authorisation/roles
parentf427b554c033b6c9d1d37fc420988a14fdc526a9 (diff)
downloadgn-auth-99023088e70c6db684785ab6a1a8b11331058efd.tar.gz
Use new db resultset conversion functions.
Diffstat (limited to 'gn_auth/auth/authorisation/roles')
-rw-r--r--gn_auth/auth/authorisation/roles/models.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/gn_auth/auth/authorisation/roles/models.py b/gn_auth/auth/authorisation/roles/models.py
index 53c0378..94ad2d1 100644
--- a/gn_auth/auth/authorisation/roles/models.py
+++ b/gn_auth/auth/authorisation/roles/models.py
@@ -13,7 +13,7 @@ from ...db import sqlite3 as db
from ...authentication.users import User
from ..checks import authorised_p
-from ..privileges import Privilege
+from ..privileges import Privilege, db_row_to_privilege
@dataclass(frozen=True)
@@ -104,9 +104,7 @@ def __organise_privileges__(resources, row) -> dict:
role.role_id,
role.role_name,
role.user_editable,
- role.privileges + (Privilege(
- row["privilege_id"],
- row["privilege_description"]),)
+ role.privileges + (db_row_to_privilege(row),)
)
}
}