mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-24 16:03:43 +08:00
Automatic merge from release/2.7.0 -> release/2.8.0
* commit '430df17dd3cefe0f25328ce69bf8d8b0d0e95253': fix: SyncOnce should invalidate policy cache fix: refine policy match conditions minor updates fix: simplify rbac policy condition to match projects and roles
This commit is contained in:
@@ -253,7 +253,7 @@ func init() {
|
||||
}
|
||||
req.Add(jsonutils.NewArray(data...), key)
|
||||
}
|
||||
fmt.Println(req.String())
|
||||
fmt.Println("Request:", req.String())
|
||||
|
||||
var token mcclient.TokenCredential
|
||||
if len(args.User) > 0 {
|
||||
@@ -273,6 +273,11 @@ func init() {
|
||||
}
|
||||
printObject(result)
|
||||
|
||||
fmt.Println("userCred:", token)
|
||||
m := policy.PolicyManager.MatchedPolicies(false, token)
|
||||
fmt.Println("matched policies:", m)
|
||||
m = policy.PolicyManager.MatchedPolicies(true, token)
|
||||
fmt.Println("matched admin policies:", m)
|
||||
return nil
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user