From 43f9b6d61c7d9a24284e0b2baa42f6fae4b30c3d Mon Sep 17 00:00:00 2001 From: Qiu Jian Date: Tue, 13 Nov 2018 22:33:38 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=EF=BC=9Aclimc=E8=B0=83?= =?UTF-8?q?=E7=94=A8rbac=E6=8E=A5=E5=8F=A3=E5=8F=82=E6=95=B0=E9=94=99?= =?UTF-8?q?=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cmd/climc/shell/policies.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/climc/shell/policies.go b/cmd/climc/shell/policies.go index ec9cd07bec..0ff886613e 100644 --- a/cmd/climc/shell/policies.go +++ b/cmd/climc/shell/policies.go @@ -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 {