RBAC: Fix search user permissions (#74729)

Co-authored-by: Alexander Zobnin <alexanderzobnin@gmail.com>
This commit is contained in:
Gabriel MABILLE 2023-09-13 15:19:19 +02:00 committed by GitHub
parent 946da57b6a
commit 729f9a01a0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -78,7 +78,7 @@ func (s *AccessControlStore) SearchUsersPermissions(ctx context.Context, orgID i
INNER JOIN team_role AS tr ON tr.role_id = p.role_id
INNER JOIN team_member AS tm ON tm.team_id = tr.team_id
UNION ALL
SELECT ou.user_id, br.org_id, p.action, p.scope
SELECT ou.user_id, ou.org_id, p.action, p.scope
FROM permission AS p
INNER JOIN builtin_role AS br ON br.role_id = p.role_id
INNER JOIN org_user AS ou ON ou.role = br.role