From d3007066835b2244ba17eb469c67ae041a81a8ba Mon Sep 17 00:00:00 2001 From: tanshanshan Date: Sat, 14 Jul 2018 14:13:28 +0800 Subject: [PATCH] fixdup --- pkg/apis/rbac/validation/validation.go | 6 ------ 1 file changed, 6 deletions(-) diff --git a/pkg/apis/rbac/validation/validation.go b/pkg/apis/rbac/validation/validation.go index 1cb0850cc3a..4f7952bf3da 100644 --- a/pkg/apis/rbac/validation/validation.go +++ b/pkg/apis/rbac/validation/validation.go @@ -231,18 +231,12 @@ func ValidateRoleBindingSubject(subject rbac.Subject, isNamespaced bool, fldPath case rbac.UserKind: // TODO(ericchiang): What other restrictions on user name are there? - if len(subject.Name) == 0 { - allErrs = append(allErrs, field.Invalid(fldPath.Child("name"), subject.Name, "user name cannot be empty")) - } if subject.APIGroup != rbac.GroupName { allErrs = append(allErrs, field.NotSupported(fldPath.Child("apiGroup"), subject.APIGroup, []string{rbac.GroupName})) } case rbac.GroupKind: // TODO(ericchiang): What other restrictions on group name are there? - if len(subject.Name) == 0 { - allErrs = append(allErrs, field.Invalid(fldPath.Child("name"), subject.Name, "group name cannot be empty")) - } if subject.APIGroup != rbac.GroupName { allErrs = append(allErrs, field.NotSupported(fldPath.Child("apiGroup"), subject.APIGroup, []string{rbac.GroupName})) }