-
Notifications
You must be signed in to change notification settings - Fork 413
Support multiple resources policies PART 2 #8907
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
merging master
pkg/api/controller_test.go
Outdated
| expected: auth.CheckAllow, | ||
| }, | ||
| { | ||
| name: "read second resource, unpermitted", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit
| name: "read second resource, unpermitted", | |
| name: "read second resource, denied", |
| } | ||
| } | ||
|
|
||
| func TestCheckPermissions_multipleResources(t *testing.T) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add test with 2 policies: one for allow and one for deny and make sure the deny takes effect
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added. also added tests to prevent "["this","case",]"
Closes #8857 (second part, see first part)
This PR leverages the parser func introduced in the first PR, to parse the
resourcestring and allow multiple resources statements.