-
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.
Handle LH policy conflicts in group conversations (#1595)
* Import removeTeam to Galley.API.LegalHold without import cycles. (will be needed shortly.) * iterateConversations. (Copied from #1507, which has meanwhile been reverted in #1549.) * Make removeMember device id argument optional. * handleGroupConvPolicyConflicts [wip] * test stub * mapcon * fix bug in handleGroupConvPolicyConflicts * add 2 test cases: who is admin? who gets removed? * Add group conv logic [wip] * move lh helpers to utils * fixup add members * fixup tests * use Conversation from galley to include self * implement anyLHConsentMissing * Move check*Event funs from Teams to Utils * update first * adjust test to new setting & adjust case when peer is admin * hi ci * Add checks for leave events * add testNoConsentCannotBeInvited * add failing test case * Add guards (test succeeds) * refactor: rename guard functions * comment wording * anyLegalholdActivated: make true to the name * adjust testNoConsentRemoveFromGroupConv * inviting conflicting users: adjust and rename test * remove futurework (wont do) and add comments * remove test marker * spell out the tests * add FUTUREWORKs for test structure * comment wording * add test for v2 endpoint * add additional safeguard * Cleanup. * Add two missing test case stubs. * Eliminate redundant negation in function name. * Boolean blindness. only the first line changed, rest is ormolu noise. * Fix call side. * Changed my mind about whether boolean blindness is a good thing. * Fixup. * Cleanup (move source comment to inner block). * Tweak detail. * Remove dubious claim. #1595 (comment) * Simplify. * Move code around. * LH consent: guarantee that all conflicting conv members are removed. * Taking back e16a0bc. (I thought I had spotted a difference in database load, but I think i was wrong, and the original code is more straight-forward.) * Fixup. * Change test cases & descriptions. * fix syntax * All -> Some (explanation in message) Why 1) Because "Some" is the negation of "None" 2) This is consistent with testGroup "Legalhold is activated for user A in a group conversation" * add failing test case * Refactor: factor out new fn getLHStatusForUsers * Update business logic * Remove NoConsentingAdmins test case * Add test case: mixed invitees * Refactor: group tests regarding invite together * assertion (it's non-trivial, but easy enough to convince ourselves that it'll pass fine, so no error handling needed.) * Language. Co-authored-by: Matthias Fischmann <mf@zerobuzz.net>
- Loading branch information
Showing
9 changed files
with
538 additions
and
136 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
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.