From 2f9bcdf344264c8d69fb03e351cd9c3650b62ebc Mon Sep 17 00:00:00 2001 From: Anis Elleuch Date: Fri, 21 Jan 2022 17:46:49 +0100 Subject: [PATCH] typo: Error out if the policy is already set in policy update cmd (#3931) Fix a typo when checking if a policy is already set to a user or a group. --- cmd/admin-policy-update.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/admin-policy-update.go b/cmd/admin-policy-update.go index aaa414c3..f4d91309 100644 --- a/cmd/admin-policy-update.go +++ b/cmd/admin-policy-update.go @@ -51,7 +51,7 @@ EXAMPLES: 1. Add the "diagnostics" policy for user "james". {{.Prompt}} {{.HelpName}} myminio diagnostics user=james - 2. add the "diagnostics" policy for group "auditors". + 2. Add the "diagnostics" policy for group "auditors". {{.Prompt}} {{.HelpName}} myminio diagnostics group=auditors `, } @@ -123,7 +123,7 @@ func mainAdminPolicyUpdate(ctx *cli.Context) error { } updatedPolicies, e := updateCannedPolicies(existingPolicies, policiesToAdd) - if err != nil { + if e != nil { fatalIf(probe.NewError(e).Trace(args...), "Unable to update the policy") }