forked from baron/baron-sso
refactoring
This commit is contained in:
@@ -603,7 +603,6 @@ func manageableTenantKeysFromProfile(profile *domain.UserProfileResponse) map[st
|
||||
}
|
||||
}
|
||||
|
||||
addKey(profile.CompanyCode)
|
||||
if profile.TenantID != nil {
|
||||
addKey(*profile.TenantID)
|
||||
}
|
||||
@@ -631,8 +630,6 @@ func canAccessIdentityByTenant(profile *domain.UserProfileResponse, identity ser
|
||||
|
||||
for _, raw := range []string{
|
||||
extractTraitString(identity.Traits, "tenant_id"),
|
||||
extractTraitString(identity.Traits, "companyCode"),
|
||||
extractTraitString(identity.Traits, "company_code"),
|
||||
} {
|
||||
if _, ok := keys[strings.ToLower(strings.TrimSpace(raw))]; ok {
|
||||
return true
|
||||
|
||||
Reference in New Issue
Block a user