[WPB-10783] Prevent MLS-Legalhold interactions#4245
Merged
akshaymankar merged 6 commits intodevelopfrom Sep 18, 2024
Merged
Conversation
5ee899f to
5ff06d3
Compare
54790fd to
1ce6612
Compare
f3e094c to
0dd5e93
Compare
MangoIV
commented
Sep 18, 2024
Contributor
Author
MangoIV
left a comment
There was a problem hiding this comment.
looks good to me. I cannot approve as this is my PR but consider it approved.
Comment on lines
+398
to
+401
| disallowIfMLSUser luid = do | ||
| void $ iterateConversations luid (toRange (Proxy @500)) $ \convs -> do | ||
| when (any (\c -> c.convProtocol /= ProtocolProteus) convs) $ do | ||
| throwS @'MLSLegalholdIncompatible |
Contributor
Author
There was a problem hiding this comment.
Suggested change
| disallowIfMLSUser luid = do | |
| void $ iterateConversations luid (toRange (Proxy @500)) $ \convs -> do | |
| when (any (\c -> c.convProtocol /= ProtocolProteus) convs) $ do | |
| throwS @'MLSLegalholdIncompatible | |
| disallowIfMLSUser luid = | |
| void $ iterateConversations luid (toRange (Proxy @500)) $ \convs -> | |
| when (any (\c -> c.convProtocol /= ProtocolProteus) convs) $ | |
| throwS @'MLSLegalholdIncompatible |
Member
There was a problem hiding this comment.
Gonna leave these too, CI took too long, I'm tired today.
| -- device at (almost) the same time. | ||
| provisionLHDevice :: UserId -> Local UserId -> UserLegalHoldStatus -> Sem r () | ||
| provisionLHDevice zusr luid userLHStatus = do | ||
| disallowIfMLSUser luid |
Contributor
Author
There was a problem hiding this comment.
maybe a small comment would be nice as well, even though I won't insist on it, the code is already quite clear.
Suggested change
| disallowIfMLSUser luid | |
| -- currently, legalhold is not compatible with MLS, hence we disallow provisioning | |
| -- a legalhold device for any user who partakes in anything but proteus conversations. | |
| disallowIfMLSUser luid |
Member
There was a problem hiding this comment.
Took long enough for CI, I think I won't add it. Feel free to create another PR.
akshaymankar
approved these changes
Sep 18, 2024
This was referenced Oct 23, 2024
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Checklist
changelog.d