Commit 7bd9ddef authored by xilabao's avatar xilabao

remove resourcename validation in create role

parent ed539fb7
...@@ -207,11 +207,6 @@ func (c *CreateRoleOptions) Validate() error { ...@@ -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 return nil
} }
......
...@@ -256,7 +256,7 @@ func TestValidate(t *testing.T) { ...@@ -256,7 +256,7 @@ func TestValidate(t *testing.T) {
}, },
ResourceNames: []string{"foo"}, ResourceNames: []string{"foo"},
}, },
expectErr: true, expectErr: false,
}, },
"test-valid-case": { "test-valid-case": {
roleOptions: &CreateRoleOptions{ roleOptions: &CreateRoleOptions{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment