Safe Haskell | Safe-Inferred |
---|---|
Language | GHC2021 |
Synopsis
- testLHPreventAddingNonConsentingUsers :: HasCallStack => LhApiVersion -> App ()
- testLHGetAndUpdateSettings :: HasCallStack => ImplicitConsent -> LhApiVersion -> App ()
- testLHMessageExchange :: HasCallStack => TaggedBool "clients1New" -> TaggedBool "clients2New" -> App ()
- data TestClaimKeys
- data LHApprovedOrPending
- testLHClaimKeys :: LHApprovedOrPending -> TestClaimKeys -> App ()
- testLHAddClientManually :: App ()
- testLHDeleteClientManually :: App ()
- testLHRequestDevice :: LhApiVersion -> App ()
- checkChan :: HasCallStack => Chan t -> (t -> App (Maybe a)) -> App a
- checkChanVal :: HasCallStack => Chan (t, LazyByteString) -> (Value -> MaybeT App a) -> App a
- testLHApproveDevice :: App ()
- testLHGetDeviceStatus :: LhApiVersion -> App ()
- setTimeoutTo :: Int -> Env -> Env
- testLHDisableForUser :: App ()
- testLHEnablePerTeam :: LhApiVersion -> App ()
- testLHGetMembersIncludesStatus :: LhApiVersion -> App ()
- testLHConnectionsWithNonConsentingUsers :: LhApiVersion -> App ()
- testLHConnectionsWithConsentingUsers :: LhApiVersion -> App ()
- data GroupConvAdmin
- testLHNoConsentRemoveFromGroup :: LHApprovedOrPending -> GroupConvAdmin -> App ()
- testLHHappyFlow :: LhApiVersion -> App ()
- testLHGetStatus :: LhApiVersion -> App ()
- testLHCannotCreateGroupWithUsersInConflict :: LhApiVersion -> App ()
- testLHNoConsentCannotBeInvited :: HasCallStack => LhApiVersion -> App ()
- testLHDisableBeforeApproval :: HasCallStack => LhApiVersion -> App ()
- testBlockLHForMLSUsers :: HasCallStack => App ()
- testBlockClaimingKeyPackageForLHUsers :: HasCallStack => App ()
- testBlockCreateMLSConvForLHUsers :: HasCallStack => LhApiVersion -> App ()
- testLHApiV1 :: App ()
- testNoCommonVersion :: App ()
- data ImplicitConsent
- ensureLHFeatureConfigForServer :: ImplicitConsent -> (String -> App ()) -> App ()
Documentation
testLHGetAndUpdateSettings :: HasCallStack => ImplicitConsent -> LhApiVersion -> App () Source #
testLHMessageExchange :: HasCallStack => TaggedBool "clients1New" -> TaggedBool "clients2New" -> App () Source #
data TestClaimKeys Source #
Instances
Generic TestClaimKeys Source # | |
Defined in Test.LegalHold type Rep TestClaimKeys :: Type -> Type # from :: TestClaimKeys -> Rep TestClaimKeys x # to :: Rep TestClaimKeys x -> TestClaimKeys # | |
Show TestClaimKeys Source # | |
Defined in Test.LegalHold showsPrec :: Int -> TestClaimKeys -> ShowS # show :: TestClaimKeys -> String # showList :: [TestClaimKeys] -> ShowS # | |
type Rep TestClaimKeys Source # | |
Defined in Test.LegalHold |
data LHApprovedOrPending Source #
Instances
Generic LHApprovedOrPending Source # | |
Defined in Test.LegalHold type Rep LHApprovedOrPending :: Type -> Type # from :: LHApprovedOrPending -> Rep LHApprovedOrPending x # to :: Rep LHApprovedOrPending x -> LHApprovedOrPending # | |
Show LHApprovedOrPending Source # | |
Defined in Test.LegalHold showsPrec :: Int -> LHApprovedOrPending -> ShowS # show :: LHApprovedOrPending -> String # showList :: [LHApprovedOrPending] -> ShowS # | |
type Rep LHApprovedOrPending Source # | |
testLHClaimKeys :: LHApprovedOrPending -> TestClaimKeys -> App () Source #
Cannot fetch prekeys of LH users if requester has not given consent or has old clients.
testLHAddClientManually :: App () Source #
testLHDeleteClientManually :: App () Source #
testLHRequestDevice :: LhApiVersion -> App () Source #
checkChan :: HasCallStack => Chan t -> (t -> App (Maybe a)) -> App a Source #
pops a channel until it finds an event that returns a Just
upon running the matcher function
checkChanVal :: HasCallStack => Chan (t, LazyByteString) -> (Value -> MaybeT App a) -> App a Source #
like checkChan
but throws away the request and decodes the body
testLHApproveDevice :: App () Source #
testLHGetDeviceStatus :: LhApiVersion -> App () Source #
setTimeoutTo :: Int -> Env -> Env Source #
this sets the timeout to a higher number; we need this because the SQS queue on the brig is super slow and that's why client.remove events arrive really late
FUTUREWORK(mangoiv): improve the speed of internal event queuing
testLHDisableForUser :: App () Source #
testLHEnablePerTeam :: LhApiVersion -> App () Source #
testLHGetMembersIncludesStatus :: LhApiVersion -> App () Source #
data GroupConvAdmin Source #
Instances
Generic GroupConvAdmin Source # | |
Defined in Test.LegalHold type Rep GroupConvAdmin :: Type -> Type # from :: GroupConvAdmin -> Rep GroupConvAdmin x # to :: Rep GroupConvAdmin x -> GroupConvAdmin # | |
Show GroupConvAdmin Source # | |
Defined in Test.LegalHold showsPrec :: Int -> GroupConvAdmin -> ShowS # show :: GroupConvAdmin -> String # showList :: [GroupConvAdmin] -> ShowS # | |
type Rep GroupConvAdmin Source # | |
Defined in Test.LegalHold type Rep GroupConvAdmin = D1 ('MetaData "GroupConvAdmin" "Test.LegalHold" "integration-0.1.0-1M0hVX0XSYq1OAOo8LJGGB" 'False) (C1 ('MetaCons "LegalholderIsAdmin" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "PeerIsAdmin" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "BothAreAdmins" 'PrefixI 'False) (U1 :: Type -> Type))) |
testLHNoConsentRemoveFromGroup :: LHApprovedOrPending -> GroupConvAdmin -> App () Source #
If a member of an existing conversation is assigned a LH device, users are removed from the conversation until policy conflicts are resolved.
As to who gets to stay: - admins will stay over members - local members will stay over remote members.
testLHHappyFlow :: LhApiVersion -> App () Source #
testLHGetStatus :: LhApiVersion -> App () Source #
testLHNoConsentCannotBeInvited :: HasCallStack => LhApiVersion -> App () Source #
testLHDisableBeforeApproval :: HasCallStack => LhApiVersion -> App () Source #
testBlockLHForMLSUsers :: HasCallStack => App () Source #
testBlockCreateMLSConvForLHUsers :: HasCallStack => LhApiVersion -> App () Source #
scenario 2.2: charlie is put under legalhold but creates an MLS Group himself since he doesn't need to claim his own keypackage to do so, this would succeed we need to check upon group creation if the user is under legalhold and reject the operation if they are
testLHApiV1 :: App () Source #
testNoCommonVersion :: App () Source #
data ImplicitConsent Source #
LH can be configured in a way that does not require users to give preliminary consent to LH when being added to a team. The user still has to approve the LH device before the recording starts. This is called "implicit consent", was introduced to accomodate specific work flows, and there is some hope that it'll be removed in the future.
Explicit consent requires users to consent on entering the team, and then approve the actual being put under recording again if it happens.
This flag allows to make tests run through both configurations with minimal adjustment.
Instances
Generic ImplicitConsent Source # | |
Defined in Test.LegalHold type Rep ImplicitConsent :: Type -> Type # from :: ImplicitConsent -> Rep ImplicitConsent x # to :: Rep ImplicitConsent x -> ImplicitConsent # | |
Show ImplicitConsent Source # | |
Defined in Test.LegalHold showsPrec :: Int -> ImplicitConsent -> ShowS # show :: ImplicitConsent -> String # showList :: [ImplicitConsent] -> ShowS # | |
Eq ImplicitConsent Source # | |
Defined in Test.LegalHold (==) :: ImplicitConsent -> ImplicitConsent -> Bool # (/=) :: ImplicitConsent -> ImplicitConsent -> Bool # | |
type Rep ImplicitConsent Source # | |
ensureLHFeatureConfigForServer :: ImplicitConsent -> (String -> App ()) -> App () Source #
Ensure that the LH config is as expected: Either by expecting it from the current server's config. Or, by creating a new one.