mirror of
https://github.com/grafana/grafana.git
synced 2025-07-30 06:02:25 +08:00

* Create own legacy store function to list service accounts and update api model * Add service account tokens as a sub resource for service accounts
19 lines
466 B
SQL
19 lines
466 B
SQL
SELECT
|
|
u.id,
|
|
u.uid,
|
|
u.name,
|
|
u.is_disabled,
|
|
u.created,
|
|
u.updated
|
|
FROM {{ .Ident .UserTable }} as u JOIN {{ .Ident .OrgUserTable }} as o ON u.id = o.user_id
|
|
WHERE o.org_id = {{ .Arg .Query.OrgID }}
|
|
AND u.is_service_account
|
|
{{ if .Query.UID }}
|
|
AND u.uid = {{ .Arg .Query.UID }}
|
|
{{ end }}
|
|
{{ if .Query.Pagination.Continue }}
|
|
AND u.id >= {{ .Arg .Query.Pagination.Continue }}
|
|
{{ end }}
|
|
ORDER BY u.id asc
|
|
LIMIT {{ .Arg .Query.Pagination.Limit }}
|