feat: add audit diffing for all user editable types (#1413)

This commit is contained in:
Colin Adler
2022-05-16 11:20:11 -05:00
committed by GitHub
parent b7049032a0
commit e990a9ac28
5 changed files with 293 additions and 38 deletions

View File

@ -587,8 +587,8 @@ SET
-- Remove all duplicates from the roles.
roles = ARRAY(SELECT DISTINCT UNNEST($1 :: text[]))
WHERE
user_id = $2
AND organization_id = $3
user_id = $2
AND organization_id = $3
RETURNING user_id, organization_id, created_at, updated_at, roles
`

View File

@ -47,6 +47,6 @@ SET
-- Remove all duplicates from the roles.
roles = ARRAY(SELECT DISTINCT UNNEST(@granted_roles :: text[]))
WHERE
user_id = @user_id
AND organization_id = @org_id
user_id = @user_id
AND organization_id = @org_id
RETURNING *;