-
Notifications
You must be signed in to change notification settings - Fork 325
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
User subsystem: add profile update operations (#4046)
* UpdateUser operation; work on Error sub-effects. * Fix build * Rename onUserEvent → generateUserEvent * Use state effect for local users in mini backends * Implement user update in mini backends * Add user update property test * [feat] rethrow errors as wai errors * [feat] test behaviour if user is managed by scim * [feat] set galley api access * [feat] test all of the update record members * [feat] interpret user events * Use MiniBackend state effect in mini-backend stack * Add fake event interpreter * Add Arbitrary instance for AllowSCIMUpdates * Replace UserUpdate with a new type * Use update functionality in brig * Add locale update to user subsystem * Move allowScim argument to update structure * Add handle update functionality to UserSubsystem Some of the functions in brig now have a UserStore constraint. This is only temporary until all the user-related functionality has been migrated to subsystems. * Make sure NotPending users have an identity * Check claimed handles * Implement handle lookup in mini backend * Add DeleteUser action to UserStore * Add some TODOs * Lint and format * Added missing where clause. * Fixed tombstone. * Renamed cql query function for clarity. * usersubsystems: added handle parsing text. * Formatting. * UserSubsystems: Added prop tests for handles. * lint * UserSubsystem: added scim handle update tests. * added changelog * Added update supported protocols. * Fix 2 test cases. * Fixed property test. * Deleted repeated lines. * Regen nix. * Removed ambiguity. * Updated call sites. * Remove bogus (and unnecessary) -Wwarn pragma. * explicit imports, exports. * Removed outdated FUTUREWORK. * Typo. * Make leaking interpreter implementation into brig more explicit. * Drive-by fix. * Send handle update events. * Test for update supportedProtocols. * Update supportedProtocols [wip] * Fixed test for supported protocols. * WIP: fix permission checks * Move BadHandle type and qc generator to types-common. * Fix handle update for blocklisted handles. * Make supported-protocols update test a property. * Fix more failing test cases (same pattern as before). * Simplify checkHandle test * UserSubsystem: Implement GetSelfProfile * UserSubsystem.updateUserProfile: Add assertion for updating locale * Remove TODO deemed requiring discussion * UserSubsystem: Implement GetSelfProfile Needed for testing updates to locale * Rename names. * Re-align userstore and user subsystem interfaces around handle. * Rm some boolean blindness. * Rename names (really bad ones this time...). * Fix UpdateOriginType values in brig api. * rm TODO. * Add TODOs. * Fix TODO syntax :) * Deprioritize TODO. * Haddocs. * Improve error message for invalid handles. * Rename names. * Note on db performance. * Remove unproducable error. * Haddocks. * Remove misguided TODOs. claimHandle is not exported, it's just the cassandra-specific part of updateHandle; errors are handled in user subsystem. * Fix: update locale by client not allowed if user is managed by scim. * Fix names. * remove more low-prio TODOs. * Resolve TODO. * Add test for locale update under scim management. * Fix test. * Fix tests, add happy path for profile update. * Fixup * Fix locale update. * Rm dead code. * Typo * Fix compiler errors. * Rm dead code. * Test coverage. * Fix missing fields in update event. * Dry-by fix: make responseJsonUnsafe more helpful when crashing. * hlint. * hlint. (?!) * Polish haddocks. * Changelog. * Make Handle data type abstract. * Revert "Make Handle data type abstract." This reverts commit 459e966. * Move local function in where block. * Remove FUTUREWORK (misplaced by ormolu, also self-evident.) * Rename local function. * Fix test case. * remove obsolete changelog entry (this has been fixed in WPB-9488). * Rm dead code from rest api. * Revert "Rm dead code from rest api." This reverts commit 8c66230. (maybe this is used elsewhere? also the removal wasn't complete.) * Update services/brig/test/integration/API/UserPendingActivation.hs * Update services/brig/src/Brig/User/Auth.hs * More guards in unit tests against invalid arbitrary values. * Fixup * Fix test case. * Improve error message for `*ManagedByScim`. * Revert "Fix test case." This reverts commit 4059bf9. * Fix application logic around blocking updates because scim or e2eid. * hlint. * failed attempt to port a galley test to /integration * Revert "failed attempt to port a galley test to /integration" This reverts commit c40670e. * I think I found the problem with this test! (fix coming up) * Small fix for legacy integration test. --------- Co-authored-by: Magnus Viernickel <[email protected]> Co-authored-by: Igor Ranieri <[email protected]> Co-authored-by: Matthias Fischmann <[email protected]> Co-authored-by: Akshay Mankar <[email protected]>
- Loading branch information
1 parent
f7e669b
commit 5d37f6c
Showing
45 changed files
with
1,405 additions
and
713 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Added profile update operations to the user subsystem. |
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
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.