fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! feat(permissions): Addeding system user support for permission check v2

This commit is contained in:
Iraq Jaber
2025-03-05 21:27:37 +00:00
parent 2a4273e5bc
commit 23ba343ca8

View File

@@ -63,14 +63,14 @@ BEGIN
END; END;
-- Return the organizations where permission were granted thru org-level roles -- Return the organizations where permission were granted thru org-level roles
SELECT array_agg(org_id) INTO org_ids SELECT array_agg(sub.org_id) INTO org_ids
FROM ( FROM (
SELECT DISTINCT om.org_id SELECT DISTINCT om.org_id
FROM eventstore.org_members om FROM eventstore.org_members om
WHERE om.role = ANY(matched_roles) WHERE om.role = ANY(matched_roles)
AND om.instance_id = instanceID AND om.instance_id = instanceID
AND om.user_id = userId AND om.user_id = userId
); ) AS sub;
RETURN; RETURN;
END; END;
$$; $$;