mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-11 19:07:30 +00:00
fix(permission): sql error in cmd/setup/49/01-permitted_orgs_function.sql (#9465)
# Which Problems Are Solved SQL error in `cmd/setup/49/01-permitted_orgs_function.sql` # How the Problems Are Solved Updating `cmd/setup/49/01-permitted_orgs_function.sql` # Additional Context - Closes https://github.com/zitadel/zitadel/issues/9461 Co-authored-by: Iraq Jaber <IraqJaber@gmail.com>
This commit is contained in:
@@ -43,14 +43,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;
|
||||||
$$;
|
$$;
|
||||||
|
Reference in New Issue
Block a user