mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-21 14:19:49 +08:00
fix(keystone): hide system scope policies in domain scope view (#10194)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
This commit is contained in:
@@ -547,7 +547,14 @@ func (policy *SPolicy) GetUsages() []db.IUsage {
|
||||
}
|
||||
|
||||
func (manager *SPolicyManager) FilterByOwner(q *sqlchemy.SQuery, owner mcclient.IIdentityProvider, scope rbacutils.TRbacScope) *sqlchemy.SQuery {
|
||||
return db.SharableManagerFilterByOwner(manager, q, owner, scope)
|
||||
q = db.SharableManagerFilterByOwner(manager, q, owner, scope)
|
||||
switch scope {
|
||||
case rbacutils.ScopeProject:
|
||||
q = q.Equals("scope", rbacutils.ScopeProject)
|
||||
case rbacutils.ScopeDomain:
|
||||
q = q.NotEquals("scope", rbacutils.ScopeSystem)
|
||||
}
|
||||
return q
|
||||
}
|
||||
|
||||
func (policy *SPolicy) GetSharableTargetDomainIds() []string {
|
||||
|
||||
Reference in New Issue
Block a user