From c3ce0e40dc2c1982d50655b5d49ab0e1da922b1a Mon Sep 17 00:00:00 2001 From: Frederick Muriuki Muriithi Date: Fri, 15 Sep 2023 10:14:54 +0300 Subject: 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. --- gn_auth/auth/authorisation/resources/models.py | 1 + 1 file changed, 1 insertion(+) (limited to 'gn_auth/auth/authorisation/resources') 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( -- cgit v1.2.3