mirror of
https://github.com/andwati/zitadel.git
synced 2026-11-20 03:48:47 +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