-
Notifications
You must be signed in to change notification settings - Fork 325
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
[WPB-10783] Prevent MLS-Legalhold interactions #4245
Conversation
5ee899f
to
5ff06d3
Compare
54790fd
to
1ce6612
Compare
f3e094c
to
0dd5e93
Compare
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.
looks good to me. I cannot approve as this is my PR but consider it approved.
disallowIfMLSUser luid = do | ||
void $ iterateConversations luid (toRange (Proxy @500)) $ \convs -> do | ||
when (any (\c -> c.convProtocol /= ProtocolProteus) convs) $ do | ||
throwS @'MLSLegalholdIncompatible |
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.
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 |
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.
Gonna leave these too, CI took too long, I'm tired today.
@@ -401,6 +409,7 @@ requestDevice lzusr tid uid = do | |||
-- device at (almost) the same time. | |||
provisionLHDevice :: UserId -> Local UserId -> UserLegalHoldStatus -> Sem r () | |||
provisionLHDevice zusr luid userLHStatus = do | |||
disallowIfMLSUser luid |
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.
maybe a small comment would be nice as well, even though I won't insist on it, the code is already quite clear.
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 |
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.
Took long enough for CI, I think I won't add it. Feel free to create another PR.
Checklist
changelog.d