-
Notifications
You must be signed in to change notification settings - Fork 40
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
initial implementation of local-only users #1784
Merged
Merged
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
c7926bc
local user CRUD: extract from my initial "passwords" branch
davepacheco f999494
local user CRUD: fix up stuff extracted from the initial branch so th…
davepacheco ca321fd
local user CRUD: tests pass
davepacheco 377307d
move endpoints around, add "get" and "delete"
davepacheco bace521
fix up tests again
davepacheco f0bd3fb
remove one XXX
davepacheco be021c8
execute_and_check now generic
smklein 387a0fc
clean up
davepacheco acb1591
test (and fix) behavior of using local IdP for SamlJit Silos
davepacheco 8b07c34
more tests
davepacheco 2e84e10
more tests
davepacheco 232cf81
more comments
davepacheco 92a72ba
clarify comment and function name
davepacheco 0950c22
review feedback: rename local IdP functions
davepacheco 8cba388
Merge branch 'main' into local-user-crud
davepacheco 9deef69
Merge branch 'main' into local-user-crud
davepacheco 5bc7654
review feedback: silo user list/view could apply to all Silos
davepacheco 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
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.
This change deserves comment for future reference (but feel free to ignore this): this column was already part of the
silo_user
table and it's also in the definition ofsilo_user
in schema.rs. It's not new in the database schema. One might think this field in this struct is already present via theidentity
field at L16 above, but that's only true for things that deriveResource
. This derivesAsset
, which don't automatically get atime_deleted
field. So we have to explicitly add it here.The failure mode for not having this was that when I went to use
check_if_exists()/execute_and_check()
, I got this error:The reason is that
check_if_exists()
generates SQL that selects all of the columns that Diesel knows about. Thenexecute_and_check()
attempts to deserialize those columns into this type (SiloUser
). I believe it does not useSiloUser::as_select()
(as other things do), but by explicitly providing theQ
generic argument toget_result_async()
. I believe that causes the fields to be deserialized in whatever order they appear. There was a mismatch here because this field was missing. The particular error about a null value happened because the database was providing a null value fortime_deleted
, but it was being deserialized into a non-nullable fieldsilo_id
.