Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
feat: Rbac more coderd endpoints, unit test to confirm #1437
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
feat: Rbac more coderd endpoints, unit test to confirm #1437
Changes from 20 commits
bed0f8f
af6dc5f
01b2c94
be5b0b3
970e345
945e9fa
fdfef88
89a3678
29da9aa
63727e0
96a5727
4b6c9b0
cd2fda7
62ec87e
452c72d
307f6c0
32af1e6
28a099f
ff7bd81
d123b9f
186eb5f
5d32d9d
301d42a
a989224
ed9be78
1047391
7ad069e
e68fdbf
1a4e7e1
f250fbe
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
minor: should we just define a single
var rbac.UnauthorizedError
and use that instead in the check below?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.
Not sure what you mean?
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.
you only capture the most recent authorization call, but many endpoints call this multiple times with different objects. This should be captured and asserted in testing.
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.
Yes this is true. Most cases though the first call returns an error and the request terminates.
As I add more endpoints and see more cases, I should increase the assertions. I intend to follow this PR up with more testing and endpoints. I just want to be on the right path first.