mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-24 16:03:43 +08:00
fix(keystone): project-show by name with not found error (#15697)
This commit is contained in:
@@ -189,7 +189,11 @@ func fetchItemByName(manager IModelManager, ctx context.Context, userCred mcclie
|
||||
return nil, err
|
||||
}
|
||||
if count > 0 {
|
||||
q = manager.FilterByOwner(q, userCred, manager.NamespaceScope())
|
||||
ownerId, _, err, _ := FetchCheckQueryOwnerScope(ctx, userCred, query, manager, rbacutils.ActionGet, true)
|
||||
if err != nil {
|
||||
return nil, httperrors.NewGeneralError(err)
|
||||
}
|
||||
q = manager.FilterByOwner(q, ownerId, manager.NamespaceScope())
|
||||
q = manager.FilterBySystemAttributes(q, nil, nil, manager.ResourceScope())
|
||||
count, err = q.CountWithError()
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user