feat(api): include role's details in the list of members
This commit is contained in:
parent
c59d0da5f1
commit
a055fa139b
1 changed files with 6 additions and 2 deletions
|
|
@ -386,8 +386,12 @@ def get_members(tenant_id):
|
|||
- COALESCE(basic_authentication.invited_at,'2000-01-01'::timestamp ))>=1 AS expired_invitation,
|
||||
basic_authentication.password IS NOT NULL AS joined,
|
||||
invitation_token,
|
||||
role_id
|
||||
FROM public.users LEFT JOIN public.basic_authentication ON users.user_id=basic_authentication.user_id
|
||||
role_id,
|
||||
roles.name AS role_name,
|
||||
roles.permissions
|
||||
FROM public.users
|
||||
LEFT JOIN public.basic_authentication ON users.user_id=basic_authentication.user_id
|
||||
LEFT JOIN public.roles USING (role_id)
|
||||
WHERE users.tenant_id = %(tenantId)s AND users.deleted_at IS NULL
|
||||
ORDER BY name, id""",
|
||||
{"tenantId": tenant_id})
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue