8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
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
This unit test allows for asserting which roles can perform actions on various objects. This is much easier than making unit tests to hit the api.
Sorry, something went wrong.
test: Unit test to assert role permissions
3688b95
Import order
9129ef6
Add some comments
67a7fee
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Love me some more tests!
suggestion: Could we rename these fields for clarity? When I initially read the test I got a bit confused, as it appears to me that this test was asserting that any random user resource should have the admin role. Now after reading it, it appears that the Resource in question is the object, and the subjects are all of those identified in assertions.
admin
object
assertions
Correct. I can rename. I changed this struct up a few times, probably why it ended as it did.
Added comments too.
Sorry, something went wrong. 10000
nit: map[authSubject]bool? Kind of easier to reason about. Optional though, this is really a nit pick.
map[authSubject]bool
I felt it was easier to just list out subjects in a 1 line list.
We should probably clarify that the APIKey is owned by the user referred to by orgMember
APIKey
orgMember
It is. I changed member and orgMember to memberMe and orgMemberMe respectively.
member
memberMe
orgMemberMe
PR cleanup from comments
f60365b
- Add comments, rename fields
ebaae75
test: Unit test to assert role capabilities (#1781)
e169a78
* test: Unit test to assert role permissions This unit test allows for asserting which roles can perform actions on various objects. This is much easier than making unit tests to hit the api.
johnstcn johnstcn approved these changes
spikecurtis Awaiting requested review from spikecurtis
Successfully merging this pull request may close these issues.