wire-subsystems-0.1.0
Safe HaskellSafe-Inferred
LanguageGHC2021

Wire.StoredUser

Synopsis

Documentation

data StoredUser Source #

Instances

Instances details
Arbitrary StoredUser Source # 
Instance details

Defined in Wire.StoredUser

Generic StoredUser Source # 
Instance details

Defined in Wire.StoredUser

Associated Types

type Rep StoredUser :: Type -> Type #

Show StoredUser Source # 
Instance details

Defined in Wire.StoredUser

Record StoredUser Source # 
Instance details

Defined in Wire.StoredUser

Eq StoredUser Source # 
Instance details

Defined in Wire.StoredUser

Ord StoredUser Source # 
Instance details

Defined in Wire.StoredUser

HasField "identity" StoredUser (Maybe UserIdentity) Source # 
Instance details

Defined in Wire.StoredUser

HasField "locale" StoredUser (Maybe Locale) Source # 
Instance details

Defined in Wire.StoredUser

type Rep StoredUser Source # 
Instance details

Defined in Wire.StoredUser

type Rep StoredUser = D1 ('MetaData "StoredUser" "Wire.StoredUser" "wire-subsystems-0.1.0-8kLXA8DL8T7Joz69IIRPwJ" 'False) (C1 ('MetaCons "StoredUser" 'PrefixI 'True) ((((S1 ('MetaSel ('Just "id") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 UserId) :*: S1 ('MetaSel ('Just "name") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Name)) :*: (S1 ('MetaSel ('Just "textStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe TextStatus)) :*: (S1 ('MetaSel ('Just "pict") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Pict)) :*: S1 ('MetaSel ('Just "email") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe EmailAddress))))) :*: ((S1 ('MetaSel ('Just "emailUnvalidated") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe EmailAddress)) :*: S1 ('MetaSel ('Just "ssoId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe UserSSOId))) :*: (S1 ('MetaSel ('Just "accentId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ColourId) :*: (S1 ('MetaSel ('Just "assets") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe [Asset])) :*: S1 ('MetaSel ('Just "activated") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool))))) :*: (((S1 ('MetaSel ('Just "status") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe AccountStatus)) :*: S1 ('MetaSel ('Just "expires") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe UTCTimeMillis))) :*: (S1 ('MetaSel ('Just "language") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Language)) :*: (S1 ('MetaSel ('Just "country") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Country)) :*: S1 ('MetaSel ('Just "providerId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe ProviderId))))) :*: ((S1 ('MetaSel ('Just "serviceId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe ServiceId)) :*: S1 ('MetaSel ('Just "handle") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Handle))) :*: (S1 ('MetaSel ('Just "teamId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe TeamId)) :*: (S1 ('MetaSel ('Just "managedBy") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe ManagedBy)) :*: S1 ('MetaSel ('Just "supportedProtocols") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe (Set BaseProtocolTag)))))))))
type TupleType StoredUser Source # 
Instance details

Defined in Wire.StoredUser

toIdentity Source #

Arguments

:: Bool

Whether the user is activated

-> Maybe EmailAddress 
-> Maybe UserSSOId 
-> Maybe UserIdentity 

If the user is not activated, toIdentity will return Nothing as a precaution, because elsewhere we rely on the fact that a non-empty UserIdentity means that the user is activated.

The reason it's just a "precaution" is that we also have an invariant that having an email or phone in the database means the user has to be activated.