mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-24 16:03:43 +08:00
Merge pull request #495 in YUNIONIO/onecloud from ~QIUJIAN/onecloud:hotfix/qj-fix-rbac-enable-incompatible to release/2.3.0
* commit '43f9b6d61c7d9a24284e0b2baa42f6fae4b30c3d': 修正:climc调用rbac接口参数错误
This commit is contained in:
@@ -188,7 +188,7 @@ func init() {
|
||||
}
|
||||
R(&PolicyAdminCapableOptions{}, "policy-admin-capable", "Check admin capable", func(s *mcclient.ClientSession, args *PolicyAdminCapableOptions) error {
|
||||
auth.InitFromClientSession(s)
|
||||
policy.EnableGlobalRbac(15*time.Second, 15*time.Second)
|
||||
policy.EnableGlobalRbac(15*time.Second, 15*time.Second, false)
|
||||
|
||||
capable := policy.PolicyManager.IsAdminCapable(s.GetToken())
|
||||
fmt.Printf("%v\n", capable)
|
||||
@@ -201,7 +201,7 @@ func init() {
|
||||
}
|
||||
R(&PolicyExplainOptions{}, "policy-explain", "Explain policy result", func(s *mcclient.ClientSession, args *PolicyExplainOptions) error {
|
||||
auth.InitFromClientSession(s)
|
||||
policy.EnableGlobalRbac(15*time.Second, 15*time.Second)
|
||||
policy.EnableGlobalRbac(15*time.Second, 15*time.Second, false)
|
||||
|
||||
req := jsonutils.NewDict()
|
||||
for i := 0; i < len(args.Request); i += 1 {
|
||||
|
||||
Reference in New Issue
Block a user