mirror of
https://github.com/grafana/grafana.git
synced 2025-07-30 05:53:15 +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
14 lines
522 B
SQL
14 lines
522 B
SQL
SELECT o.org_id, u.id, u.uid, u.login, u.email, u.name,
|
|
u.created, u.updated, u.is_service_account, u.is_disabled, u.is_admin
|
|
FROM {{ .Ident .UserTable }} as u JOIN {{ .Ident .OrgUserTable }} as o ON u.id = o.user_id
|
|
WHERE o.org_id = {{ .Arg .Query.OrgID }}
|
|
AND NOT 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 }}
|