mirror of
https://github.com/grafana/grafana.git
synced 2025-07-30 07:32:57 +08:00

* Extract a helper funtion to perform list with authorization checks * Add k8s verb to utils package * Construct default mapping when no custom mapping is passed * Configure authorization checks for service accounts * Fix helper and add filtering to service accounts
8 lines
218 B
SQL
8 lines
218 B
SQL
SELECT u.id
|
|
FROM {{ .Ident .UserTable }} as u
|
|
INNER JOIN {{ .Ident .OrgUserTable }} as o ON u.id = o.user_id
|
|
WHERE o.org_id = {{ .Arg .Query.OrgID }}
|
|
AND u.uid = {{ .Arg .Query.UID }}
|
|
AND u.is_service_account
|
|
LIMIT 1;
|