remove resourcename validation in create role

This commit is contained in:
xilabao 2017-04-20 08:54:39 +08:00
parent ed539fb76f
commit 7bd9ddef60
2 changed files with 1 additions and 6 deletions

View File

@ -207,11 +207,6 @@ func (c *CreateRoleOptions) Validate() error {
}
}
// validate resource names, can not apply resource names to multiple resources.
if len(c.ResourceNames) > 0 && len(c.Resources) > 1 {
return fmt.Errorf("resource name(s) can not be applied to multiple resources")
}
return nil
}

View File

@ -256,7 +256,7 @@ func TestValidate(t *testing.T) {
},
ResourceNames: []string{"foo"},
},
expectErr: true,
expectErr: false,
},
"test-valid-case": {
roleOptions: &CreateRoleOptions{