integration-0.1.0
Safe HaskellNone
LanguageGHC2021

Test.Apps

Synopsis

Documentation

testRetrieveUsersIncludingApps :: HasCallStack => App () Source #

FUTUREWORK: testFindApp, testRetrieveUsersIncludingApps, checkUserSearch have some overlap, or at least could be re-ordered for clarity.

testFindApp :: HasCallStack => Domain -> App () Source #

FUTUREWORK: testFindApp, testRetrieveUsersIncludingApps, checkUserSearch have some overlap, or at least could be re-ordered for clarity.

testTeamSizeWithApps :: HasCallStack => TaggedBool "test internal api" -> App () Source #

data EndOfRelationship Source #

The ways in which an MLS 1:1 conversation can end.

Constructors

TeamMemberRemoved

A full member is removed from the team, account is deleted.

AppCollaboratorRemoved

An app collaborating with the team gets removed.

AppCollaboratorPermissionsDropped

An app keeps its collaborator record, but loses every permission. (Nothing about the conversation changes.)

AppDeleted

The app's own team deletes the app, so its account goes away.

UserCollaboratorRemoved

Like AppCollaboratorRemoved, but with a regular user as the collaborator. Unlike an app, a regular user *could* be connected, so the conversation may only be dissolved after establishing that they are not (see ConnectedUserCollaboratorRemoved).

ConnectedUserCollaboratorRemoved

A regular user who is both connected to the team member and a collaborator of their team loses the collaborator record. The connection still justifies the conversation, so nothing about it may change at all.

NOTE: collaborators of type "user" are not a thing in our product. Its existence is an artefact of how external apps have been implement, and nobody in the product department knows or cares about this. We still keep these two cases to document that backend does intentionally work that way.

Instances

Instances details
Generic EndOfRelationship Source # 
Instance details

Defined in Test.Apps

Associated Types

type Rep EndOfRelationship 
Instance details

Defined in Test.Apps

type Rep EndOfRelationship = D1 ('MetaData "EndOfRelationship" "Test.Apps" "integration-0.1.0-9f768L8BmGqGzujK7oiL2i" 'False) ((C1 ('MetaCons "TeamMemberRemoved" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "AppCollaboratorRemoved" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "AppCollaboratorPermissionsDropped" 'PrefixI 'False) (U1 :: Type -> Type))) :+: (C1 ('MetaCons "AppDeleted" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "UserCollaboratorRemoved" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ConnectedUserCollaboratorRemoved" 'PrefixI 'False) (U1 :: Type -> Type))))
Show EndOfRelationship Source # 
Instance details

Defined in Test.Apps

Eq EndOfRelationship Source # 
Instance details

Defined in Test.Apps

type Rep EndOfRelationship Source # 
Instance details

Defined in Test.Apps

type Rep EndOfRelationship = D1 ('MetaData "EndOfRelationship" "Test.Apps" "integration-0.1.0-9f768L8BmGqGzujK7oiL2i" 'False) ((C1 ('MetaCons "TeamMemberRemoved" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "AppCollaboratorRemoved" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "AppCollaboratorPermissionsDropped" 'PrefixI 'False) (U1 :: Type -> Type))) :+: (C1 ('MetaCons "AppDeleted" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "UserCollaboratorRemoved" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ConnectedUserCollaboratorRemoved" 'PrefixI 'False) (U1 :: Type -> Type))))

testMLSOne2OneAfterEndOfRelationship :: HasCallStack => EndOfRelationship -> App () Source #

An established MLS 1:1 conversation survives the end of the relationship that justified it.

The conversation is never deleted: the remaining party keeps it with all its metadata, and the only change is that the other party is no longer a member.

Removing the other party from the conversation and removing them from the MLS group go together: whenever the member is gone, the backend must also have signed an external remove proposal for their leaf, and whenever the member stays, there must be no such proposal. (That a remaining client can consume the proposal and commit the removal is covered by testReAddExternalAppToGroupConversation, and is not repeated here.)

testMLSOne2OneReAddExternalApp :: HasCallStack => App () Source #

Removing an app collaborator ends its MLS 1:1 conversation with a team member (see testMLSOne2OneAfterEndOfRelationship), but not for good: once the app is a collaborator again, the team member gets back the very same conversation, and can add the app to it again.