-
Notifications
You must be signed in to change notification settings - Fork 12
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
Block Users without Permission from Creating Environment Locks #815
Block Users without Permission from Creating Environment Locks #815
Conversation
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 some tests.
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.
I need to rethink this testing approach a bit. Maybe it's easier to not pass this reader around but instead have an undocumented flag on the auth package that enables mocking? At least, we definitely don't need to pass this reader around twice. The interceptor should put the verified user in the context and then it shouldn't matter how it got there.
We don't do that anymore. |
b4d6076
to
828db3a
Compare
828db3a
to
094f7fc
Compare
Takes the extracted role information from the GRPC context.
When Dex is enabled then checks if associated role has permissions for createEnvironmentLock.
Blocks user if their role does not have permissions.