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.
This commit is contained in:
Anis Elleuch
2022-01-21 08:46:49 -08:00
committed by GitHub
parent dd01c71445
commit 2f9bcdf344
+2 -2
View File
@@ -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")
}