migrate legacy API

Signed-off-by: hongming <talonwan@yunify.com>
This commit is contained in:
hongming
2020-04-14 13:59:37 +08:00
parent d38e396e8c
commit 5f951508c5
45 changed files with 1475 additions and 1358 deletions

View File

@@ -113,8 +113,7 @@ func (am *amOperator) GetRoleOfUserInTargetScope(scope iamv1alpha2.Scope, target
return nil, err
}
for _, role := range roles {
if role.Target.Name == iamv1alpha2.TargetAll ||
role.Target.Name == target {
if role.Target.Name == target {
return &role, nil
}
}