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
AuthZ: Extend /api/search to work with self-contained permissions #70749
Merged
Merged
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
4823c39
Search sql filter draft, unfinished
mgyongyosi 05d5f35
Search works for empty roles
mgyongyosi 718ab87
Merge remote-tracking branch 'origin/main' into mgyongyosi/sql-filter…
mgyongyosi 0d5f520
Add current AuthModule to SignedInUser
mgyongyosi 79a0c87
Use constant prefixes
mgyongyosi 33fe1df
Change AuthModule to AuthenticatedBy
mgyongyosi dd1c27b
Add tests for using the permissions from the SignedInUser
mgyongyosi 041130b
Merge remote-tracking branch 'origin/main' into mgyongyosi/sql-filter…
mgyongyosi c70f128
Fix sql generation for pg and mysql
mgyongyosi 0ba0f85
Fixes, clean up
mgyongyosi 891d8b0
Add test for empty permission list
mgyongyosi b71b447
Fix
mgyongyosi f7699cb
Merge remote-tracking branch 'origin/main' into mgyongyosi/sql-filter…
mgyongyosi d9b7446
Fix any vs all in case of edit permission
mgyongyosi 0e23175
Merge remote-tracking branch 'origin/main' into mgyongyosi/sql-filter…
mgyongyosi 58217e1
Update pkg/services/authn/authn.go
mgyongyosi eca220a
Update pkg/services/sqlstore/permissions/dashboard_test.go
mgyongyosi 3652ecc
Fixes, changes based on the review
mgyongyosi File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
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.
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.
Hey @mgyongyosi will this change start to create user_auth entries for basic auth and api key auth? This might be problematic but not an active issue.
Most important would be for sessions to not set auth modules as they should take the 'last authenticated' method
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.
Nope, because the
SyncHook
is only executed when theClientParams.SyncUser
is set totrue
and it's set to true for only external auth.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.
works for me, thanks for the confirmation