mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-11 21:37:32 +00:00
fix: handle default org id (#3769)
This commit is contained in:
@@ -37,7 +37,7 @@ func (q *Queries) GetProjectMemberRoles(ctx context.Context) ([]string, error) {
|
||||
return nil, err
|
||||
}
|
||||
roles := make([]string, 0)
|
||||
global := authz.GetCtxData(ctx).OrgID == iam.GlobalOrgID
|
||||
global := authz.GetCtxData(ctx).OrgID == iam.DefaultOrgID
|
||||
for _, roleMap := range q.zitadelRoles {
|
||||
if strings.HasPrefix(roleMap.Role, "PROJECT") && !strings.HasPrefix(roleMap.Role, "PROJECT_GRANT") {
|
||||
if global && !strings.HasSuffix(roleMap.Role, "GLOBAL") {
|
||||
|
Reference in New Issue
Block a user