mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-24 16:03:43 +08:00
fix: more detailed privilege hint (#13975)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
This commit is contained in:
@@ -387,8 +387,9 @@ func FetchCheckQueryOwnerScope(
|
||||
requireScope = queryScope
|
||||
}
|
||||
if doCheckRbac && (requireScope.HigherThan(allowScope) || policyTagFilters.Result.IsDeny()) {
|
||||
return nil, scope, httperrors.NewForbiddenError("not enough privilege to dp %s (require:%s,allow:%s,query:%s)",
|
||||
action, requireScope, allowScope, queryScope), policyTagFilters
|
||||
return nil, scope, httperrors.NewForbiddenError("not enough privilege to do %s:%s:%s (require:%s,allow:%s,query:%s)",
|
||||
consts.GetServiceType(), manager.KeywordPlural(), action,
|
||||
requireScope, allowScope, queryScope), policyTagFilters
|
||||
}
|
||||
return ownerId, queryScope, nil, policyTagFilters
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user