mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-10-29 17:58:36 +08:00
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