File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed
services/galley/src/Galley/API/Teams Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -736,6 +736,18 @@ instance SetFeatureConfig db LegalholdConfig where
736
736
737
737
-- we're good to update the status now.
738
738
setConfigForTeam tid wsnl _ = do
739
+ -- this extra do is to encapsulate the assertions running before the actual operation.
740
+ -- enabling LH for teams is only allowed in normal operation; disabled-permanently and
741
+ -- whitelist-teams have no or their own way to do that, resp.
742
+ featureLegalHold <- getLegalHoldFlag
743
+ case featureLegalHold of
744
+ FeatureLegalHoldDisabledByDefault -> do
745
+ pure ()
746
+ FeatureLegalHoldDisabledPermanently -> do
747
+ throw LegalHoldFeatureFlagNotEnabled
748
+ FeatureLegalHoldWhitelistTeamsAndImplicitConsent -> do
749
+ throw LegalHoldWhitelistedOnly
750
+
739
751
case wssStatus wsnl of
740
752
FeatureStatusDisabled -> LegalHold. removeSettings' @ InternalPaging tid
741
753
FeatureStatusEnabled -> ensureNotTooLargeToActivateLegalHold tid
You can’t perform that action at this time.
0 commit comments