feat: add cross-organization member search and template cloning functionality
This commit is contained in:
@@ -30,7 +30,7 @@ AS $$
|
||||
FROM public.accounts_memberships membership
|
||||
WHERE membership.user_id = (SELECT auth.uid())
|
||||
AND membership.account_id IN (
|
||||
SELECT id FROM public.get_account_ancestors(target_account_id)
|
||||
SELECT public.get_account_ancestors(target_account_id)
|
||||
)
|
||||
AND (
|
||||
membership.account_role = has_role_on_account_or_ancestor.account_role
|
||||
@@ -62,7 +62,7 @@ BEGIN
|
||||
JOIN public.role_permissions rp ON am.account_role = rp.role
|
||||
WHERE am.user_id = has_permission_or_ancestor.user_id
|
||||
AND am.account_id IN (
|
||||
SELECT id FROM public.get_account_ancestors(target_account_id)
|
||||
SELECT public.get_account_ancestors(target_account_id)
|
||||
)
|
||||
AND rp.permission = has_permission_or_ancestor.permission_name
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user