Safe Haskell | Safe-Inferred |
---|---|
Language | GHC2021 |
Synopsis
- data TeamInvitationSubsystemConfig = TeamInvitationSubsystemConfig {}
- runTeamInvitationSubsystem :: (Member (Error TeamInvitationSubsystemError) r, Member TinyLog r, Member GalleyAPIAccess r, Member UserSubsystem r, Member Random r, Member InvitationStore r, Member Now r, Member EmailSubsystem r) => TeamInvitationSubsystemConfig -> InterpreterFor TeamInvitationSubsystem r
- inviteUserImpl :: (Member (Error TeamInvitationSubsystemError) r, Member GalleyAPIAccess r, Member UserSubsystem r, Member TinyLog r, Member Random r, Member InvitationStore r, Member (Input TeamInvitationSubsystemConfig) r, Member Now r, Member EmailSubsystem r) => Local UserId -> TeamId -> InvitationRequest -> Sem r (Invitation, InvitationLocation)
- createInvitation' :: (Member GalleyAPIAccess r, Member UserSubsystem r, Member InvitationStore r, Member TinyLog r, Member (Error TeamInvitationSubsystemError) r, Member Random r, Member (Input TeamInvitationSubsystemConfig) r, Member Now r, Member EmailSubsystem r) => TeamId -> Maybe InvitationId -> Role -> Local (Maybe UserId) -> EmailAddress -> InvitationRequest -> Sem r (Invitation, InvitationCode)
- mkInvitationCode :: Member Random r => Sem r InvitationCode
- isPersonalUser :: Member UserSubsystem r => Local EmailKey -> Sem r Bool
- toInvitation :: forall r. Member TinyLog r => Text -> ShowOrHideInvitationUrl -> StoredInvitation -> Sem r Invitation
- logInvitationRequest :: (Member TinyLog r, Member (Error TeamInvitationSubsystemError) r) => (Msg -> Msg) -> Sem (Error TeamInvitationSubsystemError : r) (Invitation, InvitationCode) -> Sem r (Invitation, InvitationCode)
- ensurePermissionToAddUser :: (Member GalleyAPIAccess r, Member (Error TeamInvitationSubsystemError) r) => UserId -> TeamId -> Permissions -> Sem r ()
- logInvitationCode :: InvitationCode -> Msg -> Msg
Documentation
data TeamInvitationSubsystemConfig Source #
Instances
Arbitrary TeamInvitationSubsystemConfig Source # | |
Generic TeamInvitationSubsystemConfig Source # | |
Show TeamInvitationSubsystemConfig Source # | |
Defined in Wire.TeamInvitationSubsystem.Interpreter showsPrec :: Int -> TeamInvitationSubsystemConfig -> ShowS # show :: TeamInvitationSubsystemConfig -> String # showList :: [TeamInvitationSubsystemConfig] -> ShowS # | |
type Rep TeamInvitationSubsystemConfig Source # | |
Defined in Wire.TeamInvitationSubsystem.Interpreter type Rep TeamInvitationSubsystemConfig = D1 ('MetaData "TeamInvitationSubsystemConfig" "Wire.TeamInvitationSubsystem.Interpreter" "wire-subsystems-0.1.0-8kLXA8DL8T7Joz69IIRPwJ" 'False) (C1 ('MetaCons "TeamInvitationSubsystemConfig" 'PrefixI 'True) (S1 ('MetaSel ('Just "maxTeamSize") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word32) :*: S1 ('MetaSel ('Just "teamInvitationTimeout") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Timeout))) |
runTeamInvitationSubsystem :: (Member (Error TeamInvitationSubsystemError) r, Member TinyLog r, Member GalleyAPIAccess r, Member UserSubsystem r, Member Random r, Member InvitationStore r, Member Now r, Member EmailSubsystem r) => TeamInvitationSubsystemConfig -> InterpreterFor TeamInvitationSubsystem r Source #
inviteUserImpl :: (Member (Error TeamInvitationSubsystemError) r, Member GalleyAPIAccess r, Member UserSubsystem r, Member TinyLog r, Member Random r, Member InvitationStore r, Member (Input TeamInvitationSubsystemConfig) r, Member Now r, Member EmailSubsystem r) => Local UserId -> TeamId -> InvitationRequest -> Sem r (Invitation, InvitationLocation) Source #
createInvitation' :: (Member GalleyAPIAccess r, Member UserSubsystem r, Member InvitationStore r, Member TinyLog r, Member (Error TeamInvitationSubsystemError) r, Member Random r, Member (Input TeamInvitationSubsystemConfig) r, Member Now r, Member EmailSubsystem r) => TeamId -> Maybe InvitationId -> Role -> Local (Maybe UserId) -> EmailAddress -> InvitationRequest -> Sem r (Invitation, InvitationCode) Source #
mkInvitationCode :: Member Random r => Sem r InvitationCode Source #
isPersonalUser :: Member UserSubsystem r => Local EmailKey -> Sem r Bool Source #
toInvitation :: forall r. Member TinyLog r => Text -> ShowOrHideInvitationUrl -> StoredInvitation -> Sem r Invitation Source #
brig used to not store the role, so for migration we allow this to be empty and fill in the default here.
logInvitationRequest :: (Member TinyLog r, Member (Error TeamInvitationSubsystemError) r) => (Msg -> Msg) -> Sem (Error TeamInvitationSubsystemError : r) (Invitation, InvitationCode) -> Sem r (Invitation, InvitationCode) Source #
ensurePermissionToAddUser :: (Member GalleyAPIAccess r, Member (Error TeamInvitationSubsystemError) r) => UserId -> TeamId -> Permissions -> Sem r () Source #
Privilege escalation detection (make sure no RoleMember
user creates a RoleOwner
).
There is some code duplication with ensureNotElevated
.
logInvitationCode :: InvitationCode -> Msg -> Msg Source #