App platform: Implement perm check with direct db access (#97579)
* implement perm check with direct db access * add tests * more tests * Update pkg/services/authz/rbac/service.go Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com> * Update pkg/services/authz/rbac/service.go Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com> * allow fetching permissions for a user who is not a member of the org * linting * fix typo --------- Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
SELECT u.id, u.uid
|
||||
FROM {{ .Ident .UserTable }} as u
|
||||
{{ if .Query.UserUID }}
|
||||
WHERE u.uid = {{ .Arg .Query.UserUID }}
|
||||
{{ else }}
|
||||
WHERE u.id = {{ .Arg .Query.UserID }}
|
||||
{{ end }}
|
||||
Reference in New Issue
Block a user