mirror of
https://github.com/grafana/grafana.git
synced 2025-07-30 05:53:15 +08:00
13 lines
451 B
SQL
13 lines
451 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 ( 1=2
|
|
{{ if .Query.UIDs }}
|
|
OR uid IN ({{ .ArgList .Query.UIDs }})
|
|
{{ end }}
|
|
{{ if .Query.IDs }}
|
|
OR u.id IN ({{ .ArgList .Query.IDs }})
|
|
{{ end }}
|
|
)
|
|
ORDER BY u.id asc
|
|
LIMIT 500 |