aboutsummaryrefslogtreecommitdiff
path: root/gn_auth
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi2023-09-15 10:14:54 +0300
committerFrederick Muriuki Muriithi2023-09-26 03:44:31 +0300
commitc3ce0e40dc2c1982d50655b5d49ab0e1da922b1a (patch)
treec379a5306e67318f7b8b5e86df6a090f35a6be09 /gn_auth
parentf6566c76d97cb44d47cc491f13e1342f0c2555cf (diff)
downloadgn-auth-c3ce0e40dc2c1982d50655b5d49ab0e1da922b1a.tar.gz
Add System resource, and group resource(s) to list of user resources
* The system resource is public, and should be present for all users. * Each user that is a member of a group, should have their group show up in their list of resources. * Fix the SQL join: add an `ON ...` clause.
Diffstat (limited to 'gn_auth')
-rw-r--r--gn_auth/auth/authorisation/resources/models.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/gn_auth/auth/authorisation/resources/models.py b/gn_auth/auth/authorisation/resources/models.py
index 80820a5..6d8e008 100644
--- a/gn_auth/auth/authorisation/resources/models.py
+++ b/gn_auth/auth/authorisation/resources/models.py
@@ -136,6 +136,7 @@ def group_leader_resources(
cursor.execute(
"SELECT r.* FROM resource_ownership AS ro "
"INNER JOIN resources AS r "
+ "ON ro.resource_id=r.resource_id "
"WHERE ro.group_id=?",
(str(group.group_id),))
return tuple(