mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-24 16:03:43 +08:00
fix: 忽略无权限的资源标签
This commit is contained in:
@@ -23,7 +23,6 @@ import (
|
||||
|
||||
"yunion.io/x/jsonutils"
|
||||
"yunion.io/x/log"
|
||||
"yunion.io/x/pkg/errors"
|
||||
"yunion.io/x/pkg/util/stringutils"
|
||||
"yunion.io/x/sqlchemy"
|
||||
|
||||
@@ -205,7 +204,8 @@ func (manager *SMetadataManager) ListItemFilter(ctx context.Context, q *sqlchemy
|
||||
sq := resourceView.Query(field)
|
||||
ownerId, queryScope, err := FetchCheckQueryOwnerScope(ctx, userCred, query, man, policy.PolicyActionList, true)
|
||||
if err != nil {
|
||||
return nil, httperrors.NewGeneralError(errors.Wrap(err, "FetchCheckQueryOwnerScope"))
|
||||
log.Warningf("FetchCheckQueryOwnerScope.%s error: %v", man.Keyword(), err)
|
||||
continue
|
||||
}
|
||||
sq = man.FilterByOwner(sq, ownerId, queryScope)
|
||||
sq = man.FilterBySystemAttributes(sq, userCred, query, queryScope)
|
||||
|
||||
Reference in New Issue
Block a user