-
Notifications
You must be signed in to change notification settings - Fork 33
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
proposal: add banneduser middleware #455
Merged
filariow
merged 21 commits into
codeready-toolchain:master
from
filariow:banneduser-middleware
Sep 12, 2024
Merged
Changes from 20 commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
017f50c
add banneduser middleware
filariow 49effa5
fix unit tests
filariow 50348ed
Update pkg/informers/informers.go
filariow 726b42e
rename InformerService method to ListBannedUsersByEmail
filariow 73039cc
use unsecured in ensureUserIsNotBanned Middleware
filariow 1ed6846
Update pkg/proxy/proxy.go
filariow d7393c5
return error from Middleware
filariow 6c12ec8
hide ban details
filariow aa1697e
improve ensureUserIsNotBanned comment
filariow 2061e88
logging error on ListBannedUsersByEmail invocation
filariow e262500
add InformerService unit tests
filariow db4ae5e
fix typo
filariow c069031
fix linter complaints
filariow b822ccf
add integration tests
filariow 62726bb
fix linter complaints
filariow ce2dc49
Merge branch 'master' into banneduser-middleware
filariow d81542b
add comment
filariow 6609036
Merge branch 'master' into banneduser-middleware
filariow 95ce224
Merge branch 'master' into banneduser-middleware
mfrancisc 8588445
Merge remote-tracking branch 'upstream/master' into banneduser-middle…
filariow b465d18
Merge branch 'master' into banneduser-middleware
mfrancisc File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
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.
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.
Should we check here the type assertion?
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'm not sure this can happen. If I'm not mistaken it's stored internally as
*unstructured.Unstructured
(cf. https://github.com/kubernetes/client-go/blob/2666bd29867c96168c5e9429fd74fd9bfbedac8b/dynamic/dynamicinformer/informer.go#L138). Also I can not immagine how to write a test for covering this check.The other functions in this file are using an unchecked casting like this too. I'd say that -if we find out it to be a problem- we can create a PR for fixing this in all the functions. WDYT?
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.
Understood! Thank you :)