-
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
Add legalhold status to user profile #1522
Conversation
ade8e81
to
c9ab0d4
Compare
6e8aa05
to
0bc516c
Compare
0bc516c
to
0e6f202
Compare
|
||
instance ToSchema UserLegalHoldStatus where | ||
declareNamedSchema = tweak . genericDeclareNamedSchema opts | ||
schema = |
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.
In the future, this stuff should go into a separate PR. Especially so since this patch and the patch that you actually wanted to work on are commutative.
@@ -1,5 +1,4 @@ | |||
{-# LANGUAGE RecordWildCards #-} | |||
{-# OPTIONS_GHC -Wno-orphans #-} |
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.
Ah, nice.
@@ -900,7 +901,7 @@ botGetSelfH bot = json <$> botGetSelf bot | |||
botGetSelf :: BotId -> Handler Public.UserProfile | |||
botGetSelf bot = do | |||
p <- lift $ User.lookupUser NoPendingInvitations (botUserId bot) | |||
maybe (throwStd userNotFound) (return . Public.publicProfile) p | |||
maybe (throwStd userNotFound) (return . (`Public.publicProfile` UserLegalHoldNoConsent)) p |
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.
Actually, this is an interesting question: what should be the default for bots? (And not just the value here, also the corresp. behavior. Maybe bots also have a member record and we can just pull that here, and answer this question later?)
* Add legalhold status to user profile * Work around bug in test utils. see https://wearezeta.atlassian.net/browse/SQSERVICES-471 Co-authored-by: Matthias Fischmann <mf@zerobuzz.net>
No description provided.