修正:climc调用rbac接口参数错误

This commit is contained in:
Qiu Jian
2018-11-13 22:33:38 +08:00
parent b2ffa81af9
commit 43f9b6d61c
+2 -2
View File
@@ -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 {