Fix user/group argument parsing (#3602)

This commit is contained in:
Aditya Manthramurthy
2021-02-09 14:25:11 -08:00
committed by GitHub
parent f782b462c6
commit 7c0fb6a99e
+1 -3
View File
@@ -65,10 +65,8 @@ func checkAdminPolicySetSyntax(ctx *cli.Context) {
}
func parseEntityArg(arg string) (userOrGroup string, isGroup bool, err error) {
parts := strings.Split(arg, "=")
parts := strings.SplitN(arg, "=", 2)
switch {
case len(parts) != 2:
fallthrough
case parts[1] == "":
err = errBadUserGroupArg
case strings.ToLower(parts[0]) == "user":