Safe Haskell | Safe-Inferred |
---|---|
Language | GHC2021 |
Synopsis
- getFeature :: forall cfg r. (GetFeatureConfig cfg, ComputeFeatureConstraints cfg r, Member (Input Opts) r, Member TeamFeatureStore r, Member (ErrorS 'NotATeamMember) r, Member TeamStore r) => UserId -> TeamId -> Sem r (LockableFeature cfg)
- getFeatureInternal :: (GetFeatureConfig cfg, ComputeFeatureConstraints cfg r, Member (Input Opts) r, Member (ErrorS 'TeamNotFound) r, Member TeamFeatureStore r, Member TeamStore r) => TeamId -> Sem r (LockableFeature cfg)
- getFeatureMulti :: forall cfg r. (GetFeatureConfig cfg, ComputeFeatureConstraints cfg r, Member (Input Opts) r, Member TeamFeatureStore r) => TeamFeatureNoConfigMultiRequest -> Sem r (TeamFeatureNoConfigMultiResponse cfg)
- getAllTeamFeaturesForServer :: forall r. Member (Input Opts) r => Sem r AllTeamFeatures
- getAllTeamFeaturesForTeam :: forall r. (Member (Input Opts) r, Member (ErrorS 'NotATeamMember) r, Member LegalHoldStore r, Member TeamFeatureStore r, Member TeamStore r) => Local UserId -> TeamId -> Sem r AllTeamFeatures
- getAllTeamFeaturesForUser :: forall r. (Member BrigAccess r, Member (ErrorS 'NotATeamMember) r, Member (ErrorS 'TeamNotFound) r, Member (ErrorS OperationDenied) r, Member (Input Opts) r, Member LegalHoldStore r, Member TeamFeatureStore r, Member TeamStore r) => UserId -> Sem r AllTeamFeatures
- getSingleFeatureForUser :: forall cfg r. (GetFeatureConfig cfg, Member (Input Opts) r, Member (ErrorS 'NotATeamMember) r, Member (ErrorS 'TeamNotFound) r, Member TeamStore r, Member TeamFeatureStore r, GetFeatureForUserConstraints cfg r, ComputeFeatureConstraints cfg r) => UserId -> Sem r (LockableFeature cfg)
- class (IsFeatureConfig cfg, GetFeatureDefaults (FeatureDefaults cfg), NpProject cfg Features) => GetFeatureConfig cfg where
- type GetFeatureForUserConstraints cfg (r :: EffectRow) :: Constraint
- type ComputeFeatureConstraints cfg (r :: EffectRow) :: Constraint
- getFeatureForUser :: GetFeatureForUserConstraints cfg r => UserId -> Sem r (LockableFeature cfg)
- computeFeature :: ComputeFeatureConstraints cfg r => TeamId -> LockableFeature cfg -> DbFeature cfg -> Sem r (LockableFeature cfg)
- getFeatureForTeam :: forall cfg r. (GetFeatureConfig cfg, ComputeFeatureConstraints cfg r, Member (Input Opts) r, Member TeamFeatureStore r) => TeamId -> Sem r (LockableFeature cfg)
- getFeatureForServer :: forall cfg r. (GetFeatureDefaults (FeatureDefaults cfg), NpProject cfg Features, Member (Input Opts) r) => Sem r (LockableFeature cfg)
- guardSecondFactorDisabled :: forall r. (Member TeamFeatureStore r, Member (Input Opts) r, Member (ErrorS 'AccessDenied) r, Member TeamStore r, Member ConversationStore r) => UserId -> ConvId -> Sem r ()
- data DoAuth
- featureEnabledForTeam :: forall cfg r. (GetFeatureConfig cfg, Member (Input Opts) r, Member (ErrorS 'TeamNotFound) r, Member TeamStore r, Member TeamFeatureStore r, ComputeFeatureConstraints cfg r) => TeamId -> Sem r Bool
- toTeamStatus :: TeamId -> LockableFeature cfg -> TeamStatus cfg
Documentation
getFeature :: forall cfg r. (GetFeatureConfig cfg, ComputeFeatureConstraints cfg r, Member (Input Opts) r, Member TeamFeatureStore r, Member (ErrorS 'NotATeamMember) r, Member TeamStore r) => UserId -> TeamId -> Sem r (LockableFeature cfg) Source #
getFeatureInternal :: (GetFeatureConfig cfg, ComputeFeatureConstraints cfg r, Member (Input Opts) r, Member (ErrorS 'TeamNotFound) r, Member TeamFeatureStore r, Member TeamStore r) => TeamId -> Sem r (LockableFeature cfg) Source #
getFeatureMulti :: forall cfg r. (GetFeatureConfig cfg, ComputeFeatureConstraints cfg r, Member (Input Opts) r, Member TeamFeatureStore r) => TeamFeatureNoConfigMultiRequest -> Sem r (TeamFeatureNoConfigMultiResponse cfg) Source #
getAllTeamFeaturesForServer :: forall r. Member (Input Opts) r => Sem r AllTeamFeatures Source #
getAllTeamFeaturesForTeam :: forall r. (Member (Input Opts) r, Member (ErrorS 'NotATeamMember) r, Member LegalHoldStore r, Member TeamFeatureStore r, Member TeamStore r) => Local UserId -> TeamId -> Sem r AllTeamFeatures Source #
getAllTeamFeaturesForUser :: forall r. (Member BrigAccess r, Member (ErrorS 'NotATeamMember) r, Member (ErrorS 'TeamNotFound) r, Member (ErrorS OperationDenied) r, Member (Input Opts) r, Member LegalHoldStore r, Member TeamFeatureStore r, Member TeamStore r) => UserId -> Sem r AllTeamFeatures Source #
getSingleFeatureForUser :: forall cfg r. (GetFeatureConfig cfg, Member (Input Opts) r, Member (ErrorS 'NotATeamMember) r, Member (ErrorS 'TeamNotFound) r, Member TeamStore r, Member TeamFeatureStore r, GetFeatureForUserConstraints cfg r, ComputeFeatureConstraints cfg r) => UserId -> Sem r (LockableFeature cfg) Source #
class (IsFeatureConfig cfg, GetFeatureDefaults (FeatureDefaults cfg), NpProject cfg Features) => GetFeatureConfig cfg where Source #
Don't export methods of this typeclass
Nothing
type GetFeatureForUserConstraints cfg (r :: EffectRow) :: Constraint Source #
type GetFeatureForUserConstraints cfg (r :: EffectRow) = DefaultGetFeatureForUserConstraints cfg r
type ComputeFeatureConstraints cfg (r :: EffectRow) :: Constraint Source #
type ComputeFeatureConstraints cfg r = ()
getFeatureForUser :: GetFeatureForUserConstraints cfg r => UserId -> Sem r (LockableFeature cfg) Source #
default getFeatureForUser :: DefaultGetFeatureForUserConstraints cfg r => UserId -> Sem r (LockableFeature cfg) Source #
computeFeature :: ComputeFeatureConstraints cfg r => TeamId -> LockableFeature cfg -> DbFeature cfg -> Sem r (LockableFeature cfg) Source #
default computeFeature :: TeamId -> LockableFeature cfg -> DbFeature cfg -> Sem r (LockableFeature cfg) Source #
Instances
getFeatureForTeam :: forall cfg r. (GetFeatureConfig cfg, ComputeFeatureConstraints cfg r, Member (Input Opts) r, Member TeamFeatureStore r) => TeamId -> Sem r (LockableFeature cfg) Source #
getFeatureForServer :: forall cfg r. (GetFeatureDefaults (FeatureDefaults cfg), NpProject cfg Features, Member (Input Opts) r) => Sem r (LockableFeature cfg) Source #
guardSecondFactorDisabled :: forall r. (Member TeamFeatureStore r, Member (Input Opts) r, Member (ErrorS 'AccessDenied) r, Member TeamStore r, Member ConversationStore r) => UserId -> ConvId -> Sem r () Source #
If second factor auth is enabled, make sure that end-points that don't support it, but should, are blocked completely. (This is a workaround until we have 2FA for those end-points as well.)
This function exists to resolve a cyclic dependency.
featureEnabledForTeam :: forall cfg r. (GetFeatureConfig cfg, Member (Input Opts) r, Member (ErrorS 'TeamNotFound) r, Member TeamStore r, Member TeamFeatureStore r, ComputeFeatureConstraints cfg r) => TeamId -> Sem r Bool Source #
toTeamStatus :: TeamId -> LockableFeature cfg -> TeamStatus cfg Source #