diff --git a/cassandra-schema.cql b/cassandra-schema.cql index e9e0b6c8b9..f55cadd4a6 100644 --- a/cassandra-schema.cql +++ b/cassandra-schema.cql @@ -139,6 +139,8 @@ CREATE TABLE galley_test.team_features ( mls_default_protocol int, mls_protocol_toggle_users set, mls_status int, + outlook_cal_integration_lock_status int, + outlook_cal_integration_status int, search_visibility_inbound_status int, search_visibility_status int, self_deleting_messages_lock_status int, diff --git a/changelog.d/2-features/pr-3025 b/changelog.d/2-features/pr-3025 new file mode 100644 index 0000000000..44fc29cc67 --- /dev/null +++ b/changelog.d/2-features/pr-3025 @@ -0,0 +1 @@ +Feature flag for Outlook calendar integration diff --git a/charts/galley/templates/configmap.yaml b/charts/galley/templates/configmap.yaml index 9962452b0c..2e783e5bdf 100644 --- a/charts/galley/templates/configmap.yaml +++ b/charts/galley/templates/configmap.yaml @@ -115,5 +115,9 @@ data: mls: {{- toYaml .settings.featureFlags.mls | nindent 10 }} {{- end }} + {{- if .settings.featureFlags.outlookCalIntegration }} + outlookCalIntegration: + {{- toYaml .settings.featureFlags.outlookCalIntegration | nindent 10 }} + {{- end }} {{- end }} {{- end }} diff --git a/charts/galley/values.yaml b/charts/galley/values.yaml index 8f260a0abe..35723a03c8 100644 --- a/charts/galley/values.yaml +++ b/charts/galley/values.yaml @@ -84,6 +84,10 @@ config: validateSAMLemails: defaults: status: enabled + outlookCalIntegration: + defaults: + status: disabled + lockStatus: locked aws: region: "eu-west-1" diff --git a/docs/src/developer/reference/config-options.md b/docs/src/developer/reference/config-options.md index 938ddba131..37068b2ad5 100644 --- a/docs/src/developer/reference/config-options.md +++ b/docs/src/developer/reference/config-options.md @@ -463,6 +463,20 @@ federator: clientPrivateKey: client-key.pem ``` +## Outlook calalendar integration + +This feature setting only applies to the Outlook Calendar extension for Wire. As it is an external service, it should only be configured through this feature flag and otherwise ignored by the backend. + +Example default configuration: + +```yaml +# galley.yaml +outlookCalIntegration: + defaults: + status: disabled + lockStatus: locked +``` + ## Settings in brig Some features (as of the time of writing this: only diff --git a/libs/galley-types/src/Galley/Types/Teams.hs b/libs/galley-types/src/Galley/Types/Teams.hs index a06c1b0ea0..89c52fcdba 100644 --- a/libs/galley-types/src/Galley/Types/Teams.hs +++ b/libs/galley-types/src/Galley/Types/Teams.hs @@ -38,6 +38,7 @@ module Galley.Types.Teams flagsTeamFeatureValidateSAMLEmailsStatus, flagTeamFeatureSndFactorPasswordChallengeStatus, flagTeamFeatureSearchVisibilityInbound, + flagOutlookCalIntegration, flagMLS, Defaults (..), ImplicitLockStatus (..), @@ -150,7 +151,8 @@ data FeatureFlags = FeatureFlags _flagsTeamFeatureValidateSAMLEmailsStatus :: !(Defaults (ImplicitLockStatus ValidateSAMLEmailsConfig)), _flagTeamFeatureSndFactorPasswordChallengeStatus :: !(Defaults (WithStatus SndFactorPasswordChallengeConfig)), _flagTeamFeatureSearchVisibilityInbound :: !(Defaults (ImplicitLockStatus SearchVisibilityInboundConfig)), - _flagMLS :: !(Defaults (ImplicitLockStatus MLSConfig)) + _flagMLS :: !(Defaults (ImplicitLockStatus MLSConfig)), + _flagOutlookCalIntegration :: !(Defaults (WithStatus OutlookCalIntegrationConfig)) } deriving (Eq, Show, Generic) @@ -200,6 +202,7 @@ instance FromJSON FeatureFlags where <*> (fromMaybe (Defaults (defFeatureStatus @SndFactorPasswordChallengeConfig)) <$> (obj .:? "sndFactorPasswordChallenge")) <*> withImplicitLockStatusOrDefault obj "searchVisibilityInbound" <*> withImplicitLockStatusOrDefault obj "mls" + <*> (fromMaybe (Defaults (defFeatureStatus @OutlookCalIntegrationConfig)) <$> (obj .:? "outlookCalIntegration")) where withImplicitLockStatusOrDefault :: forall cfg. (IsFeatureConfig cfg, Schema.ToSchema cfg) => Object -> Key -> A.Parser (Defaults (ImplicitLockStatus cfg)) withImplicitLockStatusOrDefault obj fieldName = fromMaybe (Defaults (ImplicitLockStatus (defFeatureStatus @cfg))) <$> obj .:? fieldName @@ -220,6 +223,7 @@ instance ToJSON FeatureFlags where sndFactorPasswordChallenge searchVisibilityInbound mls + outlookCalIntegration ) = object [ "sso" .= sso, @@ -234,7 +238,8 @@ instance ToJSON FeatureFlags where "validateSAMLEmails" .= validateSAMLEmails, "sndFactorPasswordChallenge" .= sndFactorPasswordChallenge, "searchVisibilityInbound" .= searchVisibilityInbound, - "mls" .= mls + "mls" .= mls, + "outlookCalIntegration" .= outlookCalIntegration ] instance FromJSON FeatureSSO where diff --git a/libs/galley-types/test/unit/Test/Galley/Types.hs b/libs/galley-types/test/unit/Test/Galley/Types.hs index 3e92614977..367f0413f1 100644 --- a/libs/galley-types/test/unit/Test/Galley/Types.hs +++ b/libs/galley-types/test/unit/Test/Galley/Types.hs @@ -98,6 +98,7 @@ instance Arbitrary FeatureFlags where <*> arbitrary <*> fmap (fmap unlocked) arbitrary <*> fmap (fmap unlocked) arbitrary + <*> arbitrary where unlocked :: ImplicitLockStatus a -> ImplicitLockStatus a unlocked = ImplicitLockStatus . Public.setLockStatus Public.LockStatusUnlocked . _unImplicitLockStatus diff --git a/libs/wire-api/src/Wire/API/Routes/Public/Galley/Feature.hs b/libs/wire-api/src/Wire/API/Routes/Public/Galley/Feature.hs index 853884e30f..a07a09fdfb 100644 --- a/libs/wire-api/src/Wire/API/Routes/Public/Galley/Feature.hs +++ b/libs/wire-api/src/Wire/API/Routes/Public/Galley/Feature.hs @@ -85,6 +85,8 @@ type FeatureAPI = :<|> FeatureStatusPut '[] '() ExposeInvitationURLsToTeamAdminConfig :<|> FeatureStatusGet SearchVisibilityInboundConfig :<|> FeatureStatusPut '[] '() SearchVisibilityInboundConfig + :<|> FeatureStatusGet OutlookCalIntegrationConfig + :<|> FeatureStatusPut '[] '() OutlookCalIntegrationConfig :<|> AllFeatureConfigsUserGet :<|> AllFeatureConfigsTeamGet :<|> FeatureConfigDeprecatedGet "The usage of this endpoint was removed in iOS in version 3.101. It is not used by team management, or webapp, and is potentially used by the old Android client as of June 2022" LegalholdConfig diff --git a/libs/wire-api/src/Wire/API/Team/Feature.hs b/libs/wire-api/src/Wire/API/Team/Feature.hs index bc9a3434de..5fe2776909 100644 --- a/libs/wire-api/src/Wire/API/Team/Feature.hs +++ b/libs/wire-api/src/Wire/API/Team/Feature.hs @@ -75,6 +75,7 @@ module Wire.API.Team.Feature AppLockConfig (..), FileSharingConfig (..), MLSConfig (..), + OutlookCalIntegrationConfig (..), AllFeatureConfigs (..), typeFeatureTTL, unImplicitLockStatus, @@ -120,11 +121,11 @@ import Wire.Arbitrary (Arbitrary, GenericUniform (..)) -- 1. Add a data type for your feature's "config" part, naming convention: -- **Config**. If your feature doesn't have a config besides -- being enabled/disabled, locked/unlocked, then the config should be a unit --- type, e.g. **data MyFeatureConfig = MyFeatureConfig**. Implement type clases +-- type, e.g. **data MyFeatureConfig = MyFeatureConfig**. Implement type classes -- 'ToSchema', 'IsFeatureConfig' and 'Arbitrary'. If your feature doesn't have a -- config implement 'FeatureTrivialConfig'. -- --- 2. Add the config to to 'AllFeatureConfigs'. Add your feature to 'allFeatureModels'. +-- 2. Add the config to to 'AllFeatureConfigs'. -- -- 3. If your feature is configurable on a per-team basis, add a schema -- migration in galley and add 'FeatureStatusCassandra' instance in @@ -137,14 +138,14 @@ import Wire.Arbitrary (Arbitrary, GenericUniform (..)) -- Galley.API.Teams.Features which defines the main business logic for getting -- and setting (with side-effects). -- --- 6. Add public routes to Routes.Public.Galley: 'FeatureStatusGet', +-- 6. Add public routes to Wire.API.Routes.Public.Galley.Feature: 'FeatureStatusGet', -- 'FeatureStatusPut' (optional) and by by user: 'FeatureConfigGet'. Then --- implement them in Galley.API.Public. +-- implement them in Galley.API.Public.Feature. -- -- 7. Add internal routes in Galley.API.Internal -- -- 8. If the feature should be configurable via Stern add routes to Stern.API. --- Manually check that the swagger looks okay. +-- Manually check that the swagger looks okay and works. -- -- 9. If the feature is configured on a per-user level, see the -- 'ConferenceCallingConfig' as an example. @@ -152,6 +153,14 @@ import Wire.Arbitrary (Arbitrary, GenericUniform (..)) -- https://github.com/wireapp/wire-server/pull/1818) -- -- 10. Extend the integration tests with cases +-- +-- 11. Edit/update the configurations: +-- - optionally add the config for local integration tests to 'galley.integration.yaml' +-- - add a config mapping to 'charts/galley/templates/configmap.yaml' +-- - add the defaults to 'charts/galley/values.yaml' +-- - optionally add config for CI to 'hack/helm_vars/wire-server/values.yaml' +-- +-- 12. Add a section to the documentation at an appropriate place (e.g. 'docs/src/developer/reference/config-options.md' or 'docs/src/understand/team-feature-settings.md') class IsFeatureConfig cfg where type FeatureSymbol cfg :: Symbol defFeatureStatus :: WithStatus cfg @@ -852,6 +861,26 @@ instance ToSchema ExposeInvitationURLsToTeamAdminConfig where instance FeatureTrivialConfig ExposeInvitationURLsToTeamAdminConfig where trivialConfig = ExposeInvitationURLsToTeamAdminConfig +---------------------------------------------------------------------- +-- OutlookCalIntegrationConfig + +-- | This feature setting only applies to the Outlook Calendar extension for Wire. +-- As it is an external service, it should only be configured through this feature flag and otherwise ignored by the backend. +data OutlookCalIntegrationConfig = OutlookCalIntegrationConfig + deriving stock (Eq, Show, Generic) + deriving (Arbitrary) via (GenericUniform OutlookCalIntegrationConfig) + +instance IsFeatureConfig OutlookCalIntegrationConfig where + type FeatureSymbol OutlookCalIntegrationConfig = "outlookCalIntegration" + defFeatureStatus = withStatus FeatureStatusDisabled LockStatusLocked OutlookCalIntegrationConfig FeatureTTLUnlimited + objectSchema = pure OutlookCalIntegrationConfig + +instance ToSchema OutlookCalIntegrationConfig where + schema = object "OutlookCalIntegrationConfig" objectSchema + +instance FeatureTrivialConfig OutlookCalIntegrationConfig where + trivialConfig = OutlookCalIntegrationConfig + ---------------------------------------------------------------------- -- FeatureStatus @@ -926,7 +955,8 @@ data AllFeatureConfigs = AllFeatureConfigs afcGuestLink :: WithStatus GuestLinksConfig, afcSndFactorPasswordChallenge :: WithStatus SndFactorPasswordChallengeConfig, afcMLS :: WithStatus MLSConfig, - afcExposeInvitationURLsToTeamAdmin :: WithStatus ExposeInvitationURLsToTeamAdminConfig + afcExposeInvitationURLsToTeamAdmin :: WithStatus ExposeInvitationURLsToTeamAdminConfig, + afcOutlookCalIntegration :: WithStatus OutlookCalIntegrationConfig } deriving stock (Eq, Show) deriving (FromJSON, ToJSON, S.ToSchema) via (Schema AllFeatureConfigs) @@ -950,6 +980,7 @@ instance ToSchema AllFeatureConfigs where <*> afcSndFactorPasswordChallenge .= featureField <*> afcMLS .= featureField <*> afcExposeInvitationURLsToTeamAdmin .= featureField + <*> afcOutlookCalIntegration .= featureField where featureField :: forall cfg. @@ -975,5 +1006,6 @@ instance Arbitrary AllFeatureConfigs where <*> arbitrary <*> arbitrary <*> arbitrary + <*> arbitrary makeLenses ''ImplicitLockStatus diff --git a/services/galley/galley.cabal b/services/galley/galley.cabal index d226178016..04be5d47a9 100644 --- a/services/galley/galley.cabal +++ b/services/galley/galley.cabal @@ -698,6 +698,7 @@ executable galley-schema V75_MLSGroupInfo V76_ProposalOrigin V77_MLSGroupMemberClient + V78_TeamFeatureOutlookCalIntegration hs-source-dirs: schema/src default-extensions: diff --git a/services/galley/galley.integration.yaml b/services/galley/galley.integration.yaml index a7759cad19..6a90f1b58e 100644 --- a/services/galley/galley.integration.yaml +++ b/services/galley/galley.integration.yaml @@ -68,6 +68,10 @@ settings: conferenceCalling: defaults: status: enabled + outlookCalIntegration: + defaults: + status: disabled + lockStatus: locked logLevel: Info logNetStrings: false diff --git a/services/galley/schema/src/Main.hs b/services/galley/schema/src/Main.hs index bb3642744b..c529020b91 100644 --- a/services/galley/schema/src/Main.hs +++ b/services/galley/schema/src/Main.hs @@ -80,6 +80,7 @@ import qualified V74_ExposeInvitationsToTeamAdmin import qualified V75_MLSGroupInfo import qualified V76_ProposalOrigin import qualified V77_MLSGroupMemberClient +import qualified V78_TeamFeatureOutlookCalIntegration main :: IO () main = do @@ -145,7 +146,8 @@ main = do V74_ExposeInvitationsToTeamAdmin.migration, V75_MLSGroupInfo.migration, V76_ProposalOrigin.migration, - V77_MLSGroupMemberClient.migration + V77_MLSGroupMemberClient.migration, + V78_TeamFeatureOutlookCalIntegration.migration -- When adding migrations here, don't forget to update -- 'schemaVersion' in Galley.Cassandra -- (see also docs/developer/cassandra-interaction.md) diff --git a/services/galley/schema/src/V78_TeamFeatureOutlookCalIntegration.hs b/services/galley/schema/src/V78_TeamFeatureOutlookCalIntegration.hs new file mode 100644 index 0000000000..cd52a49ec4 --- /dev/null +++ b/services/galley/schema/src/V78_TeamFeatureOutlookCalIntegration.hs @@ -0,0 +1,34 @@ +-- This file is part of the Wire Server implementation. +-- +-- Copyright (C) 2022 Wire Swiss GmbH +-- +-- This program is free software: you can redistribute it and/or modify it under +-- the terms of the GNU Affero General Public License as published by the Free +-- Software Foundation, either version 3 of the License, or (at your option) any +-- later version. +-- +-- This program is distributed in the hope that it will be useful, but WITHOUT +-- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +-- FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more +-- details. +-- +-- You should have received a copy of the GNU Affero General Public License along +-- with this program. If not, see . + +module V78_TeamFeatureOutlookCalIntegration + ( migration, + ) +where + +import Cassandra.Schema +import Imports +import Text.RawString.QQ + +migration :: Migration +migration = Migration 78 "Add feature config for team feature outlook calendar integration" $ do + schema' + [r| ALTER TABLE team_features ADD ( + outlook_cal_integration_status int, + outlook_cal_integration_lock_status int + ) + |] diff --git a/services/galley/src/Galley/API/Internal.hs b/services/galley/src/Galley/API/Internal.hs index 972248483c..c334e60031 100644 --- a/services/galley/src/Galley/API/Internal.hs +++ b/services/galley/src/Galley/API/Internal.hs @@ -210,6 +210,11 @@ type IFeatureAPI = :<|> IFeatureStatusGet SearchVisibilityInboundConfig :<|> IFeatureStatusPut '[] '() SearchVisibilityInboundConfig :<|> IFeatureStatusPatch '[] '() SearchVisibilityInboundConfig + -- OutlookCalIntegrationConfig + :<|> IFeatureStatusGet OutlookCalIntegrationConfig + :<|> IFeatureStatusPut '[] '() OutlookCalIntegrationConfig + :<|> IFeatureStatusPatch '[] '() OutlookCalIntegrationConfig + :<|> IFeatureStatusLockStatusPut OutlookCalIntegrationConfig -- all feature configs :<|> Named "feature-configs-internal" @@ -571,6 +576,10 @@ featureAPI = <@> mkNamedAPI @'("iget", SearchVisibilityInboundConfig) (getFeatureStatus @Cassandra DontDoAuth) <@> mkNamedAPI @'("iput", SearchVisibilityInboundConfig) (setFeatureStatusInternal @Cassandra) <@> mkNamedAPI @'("ipatch", SearchVisibilityInboundConfig) (patchFeatureStatusInternal @Cassandra) + <@> mkNamedAPI @'("iget", OutlookCalIntegrationConfig) (getFeatureStatus @Cassandra DontDoAuth) + <@> mkNamedAPI @'("iput", OutlookCalIntegrationConfig) (setFeatureStatusInternal @Cassandra) + <@> mkNamedAPI @'("ipatch", OutlookCalIntegrationConfig) (patchFeatureStatusInternal @Cassandra) + <@> mkNamedAPI @'("ilock", OutlookCalIntegrationConfig) (updateLockStatus @Cassandra @OutlookCalIntegrationConfig) <@> mkNamedAPI @"feature-configs-internal" (maybe (getAllFeatureConfigsForServer @Cassandra) (getAllFeatureConfigsForUser @Cassandra)) internalSitemap :: Routes a (Sem GalleyEffects) () diff --git a/services/galley/src/Galley/API/Public/Feature.hs b/services/galley/src/Galley/API/Public/Feature.hs index 4dbc810de6..a515aa1a96 100644 --- a/services/galley/src/Galley/API/Public/Feature.hs +++ b/services/galley/src/Galley/API/Public/Feature.hs @@ -60,6 +60,8 @@ featureAPI = <@> mkNamedAPI @'("put", ExposeInvitationURLsToTeamAdminConfig) (setFeatureStatus @Cassandra . DoAuth) <@> mkNamedAPI @'("get", SearchVisibilityInboundConfig) (getFeatureStatus @Cassandra . DoAuth) <@> mkNamedAPI @'("put", SearchVisibilityInboundConfig) (setFeatureStatus @Cassandra . DoAuth) + <@> mkNamedAPI @'("get", OutlookCalIntegrationConfig) (getFeatureStatus @Cassandra . DoAuth) + <@> mkNamedAPI @'("put", OutlookCalIntegrationConfig) (setFeatureStatus @Cassandra . DoAuth) <@> mkNamedAPI @"get-all-feature-configs-for-user" (getAllFeatureConfigsForUser @Cassandra) <@> mkNamedAPI @"get-all-feature-configs-for-team" (getAllFeatureConfigsForTeam @Cassandra) <@> mkNamedAPI @'("get-config", LegalholdConfig) (getFeatureStatusForUser @Cassandra) diff --git a/services/galley/src/Galley/API/Teams/Features.hs b/services/galley/src/Galley/API/Teams/Features.hs index 10a30bce7b..04b8eda219 100644 --- a/services/galley/src/Galley/API/Teams/Features.hs +++ b/services/galley/src/Galley/API/Teams/Features.hs @@ -181,7 +181,8 @@ type FeaturePersistentAllFeatures db = FeaturePersistentConstraint db SndFactorPasswordChallengeConfig, FeaturePersistentConstraint db MLSConfig, FeaturePersistentConstraint db SearchVisibilityInboundConfig, - FeaturePersistentConstraint db ExposeInvitationURLsToTeamAdminConfig + FeaturePersistentConstraint db ExposeInvitationURLsToTeamAdminConfig, + FeaturePersistentConstraint db OutlookCalIntegrationConfig ) getFeatureStatus :: @@ -443,6 +444,7 @@ getAllFeatureConfigsForServer = <*> getConfigForServer @db @SndFactorPasswordChallengeConfig <*> getConfigForServer @db @MLSConfig <*> getConfigForServer @db @ExposeInvitationURLsToTeamAdminConfig + <*> getConfigForServer @db @OutlookCalIntegrationConfig getAllFeatureConfigsUser :: forall db r. @@ -477,6 +479,7 @@ getAllFeatureConfigsUser uid = <*> getConfigForUser @db @SndFactorPasswordChallengeConfig uid <*> getConfigForUser @db @MLSConfig uid <*> getConfigForUser @db @ExposeInvitationURLsToTeamAdminConfig uid + <*> getConfigForUser @db @OutlookCalIntegrationConfig uid getAllFeatureConfigsTeam :: forall db r. @@ -510,6 +513,7 @@ getAllFeatureConfigsTeam tid = <*> getConfigForTeam @db @SndFactorPasswordChallengeConfig tid <*> getConfigForTeam @db @MLSConfig tid <*> getConfigForTeam @db @ExposeInvitationURLsToTeamAdminConfig tid + <*> getConfigForTeam @db @OutlookCalIntegrationConfig tid -- | Note: this is an internal function which doesn't cover all features, e.g. LegalholdConfig genericGetConfigForTeam :: @@ -899,6 +903,13 @@ instance SetFeatureConfig db ExposeInvitationURLsToTeamAdminConfig where LockStatusLocked -> throwS @OperationDenied LockStatusUnlocked -> persistAndPushEvent @db tid wsnl +instance SetFeatureConfig db OutlookCalIntegrationConfig where + setConfigForTeam tid wsnl = persistAndPushEvent @db tid wsnl + +instance GetFeatureConfig db OutlookCalIntegrationConfig where + getConfigForServer = + input <&> view (optSettings . setFeatureFlags . flagOutlookCalIntegration . unDefaults) + -- -- | 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. diff --git a/services/galley/src/Galley/Cassandra.hs b/services/galley/src/Galley/Cassandra.hs index ea4d501ef6..2056cfc2c2 100644 --- a/services/galley/src/Galley/Cassandra.hs +++ b/services/galley/src/Galley/Cassandra.hs @@ -20,4 +20,4 @@ module Galley.Cassandra (schemaVersion) where import Imports schemaVersion :: Int32 -schemaVersion = 77 +schemaVersion = 78 diff --git a/services/galley/src/Galley/Cassandra/TeamFeatures.hs b/services/galley/src/Galley/Cassandra/TeamFeatures.hs index 169280c51d..26476d7cd7 100644 --- a/services/galley/src/Galley/Cassandra/TeamFeatures.hs +++ b/services/galley/src/Galley/Cassandra/TeamFeatures.hs @@ -317,3 +317,10 @@ instance FeatureStatusCassandra MLSConfig where instance FeatureStatusCassandra ExposeInvitationURLsToTeamAdminConfig where getFeatureConfig _ = getTrivialConfigC "expose_invitation_urls_to_team_admin" setFeatureConfig _ tid statusNoLock = setFeatureStatusC "expose_invitation_urls_to_team_admin" tid (wssStatus statusNoLock) + +instance FeatureStatusCassandra OutlookCalIntegrationConfig where + getFeatureConfig _ = getTrivialConfigC "outlook_cal_integration_status" + setFeatureConfig _ tid statusNoLock = setFeatureStatusC "outlook_cal_integration_status" tid (wssStatus statusNoLock) + + getFeatureLockStatus _ = getLockStatusC "outlook_cal_integration_lock_status" + setFeatureLockStatus _ = setLockStatusC "outlook_cal_integration_lock_status" diff --git a/services/galley/test/integration/API/Teams/Feature.hs b/services/galley/test/integration/API/Teams/Feature.hs index 72d42c82a0..4172f80cd3 100644 --- a/services/galley/test/integration/API/Teams/Feature.hs +++ b/services/galley/test/integration/API/Teams/Feature.hs @@ -84,6 +84,7 @@ tests s = test s "SndFactorPasswordChallenge - lock status" $ testSimpleFlagWithLockStatus @Public.SndFactorPasswordChallengeConfig Public.FeatureStatusDisabled Public.LockStatusLocked, test s "SearchVisibilityInbound - internal API" testSearchVisibilityInbound, test s "SearchVisibilityInbound - internal multi team API" testFeatureNoConfigMultiSearchVisibilityInbound, + test s "OutlookCalIntegration" $ testSimpleFlagWithLockStatus @Public.OutlookCalIntegrationConfig Public.FeatureStatusDisabled Public.LockStatusLocked, testGroup "TTL / Conference calling" [ test s "ConferenceCalling unlimited TTL" $ testSimpleFlagTTL @Public.ConferenceCallingConfig Public.FeatureStatusEnabled FeatureTTLUnlimited, @@ -135,7 +136,9 @@ tests s = test s (unpack $ Public.featureNameBS @Public.SndFactorPasswordChallengeConfig) $ testPatch AssertLockStatusChange Public.FeatureStatusDisabled Public.SndFactorPasswordChallengeConfig, test s (unpack $ Public.featureNameBS @Public.SelfDeletingMessagesConfig) $ - testPatch AssertLockStatusChange Public.FeatureStatusEnabled (Public.SelfDeletingMessagesConfig 0) + testPatch AssertLockStatusChange Public.FeatureStatusEnabled (Public.SelfDeletingMessagesConfig 0), + test s (unpack $ Public.featureNameBS @Public.OutlookCalIntegrationConfig) $ + testPatch AssertLockStatusChange Public.FeatureStatusDisabled Public.OutlookCalIntegrationConfig ], testGroup "ExposeInvitationURLsToTeamAdmin" @@ -1020,7 +1023,8 @@ testAllFeatures = do Public.afcSndFactorPasswordChallenge = Public.withStatus FeatureStatusDisabled Public.LockStatusLocked Public.SndFactorPasswordChallengeConfig Public.FeatureTTLUnlimited, Public.afcMLS = Public.withStatus FeatureStatusDisabled Public.LockStatusUnlocked (Public.MLSConfig [] ProtocolProteusTag [MLS_128_DHKEMX25519_AES128GCM_SHA256_Ed25519] MLS_128_DHKEMX25519_AES128GCM_SHA256_Ed25519) Public.FeatureTTLUnlimited, Public.afcSearchVisibilityInboundConfig = Public.withStatus FeatureStatusDisabled Public.LockStatusUnlocked Public.SearchVisibilityInboundConfig Public.FeatureTTLUnlimited, - Public.afcExposeInvitationURLsToTeamAdmin = Public.withStatus FeatureStatusDisabled Public.LockStatusLocked Public.ExposeInvitationURLsToTeamAdminConfig Public.FeatureTTLUnlimited + Public.afcExposeInvitationURLsToTeamAdmin = Public.withStatus FeatureStatusDisabled Public.LockStatusLocked Public.ExposeInvitationURLsToTeamAdminConfig Public.FeatureTTLUnlimited, + Public.afcOutlookCalIntegration = Public.withStatus FeatureStatusDisabled Public.LockStatusLocked Public.OutlookCalIntegrationConfig Public.FeatureTTLUnlimited } testFeatureConfigConsistency :: TestM () diff --git a/tools/stern/src/Stern/API.hs b/tools/stern/src/Stern/API.hs index 31b67199ac..c08f29c04d 100644 --- a/tools/stern/src/Stern/API.hs +++ b/tools/stern/src/Stern/API.hs @@ -156,6 +156,8 @@ sitemap' = :<|> Named @"put-route-mls-config" (mkFeaturePutRoute @MLSConfig) :<|> Named @"get-search-visibility" getSearchVisibility :<|> Named @"put-search-visibility" setSearchVisibility + :<|> Named @"get-route-outlook-cal-config" (mkFeatureGetRoute @OutlookCalIntegrationConfig) + :<|> Named @"put-route-outlook-cal-config" (mkFeaturePutRouteTrivialConfigNoTTL @OutlookCalIntegrationConfig) :<|> Named @"get-team-invoice" getTeamInvoice :<|> Named @"get-team-billing-info" getTeamBillingInfo :<|> Named @"put-team-billing-info" updateTeamBillingInfo diff --git a/tools/stern/src/Stern/API/Routes.hs b/tools/stern/src/Stern/API/Routes.hs index ac61085d1d..525df34f9d 100644 --- a/tools/stern/src/Stern/API/Routes.hs +++ b/tools/stern/src/Stern/API/Routes.hs @@ -318,6 +318,8 @@ type SternAPI = :> ReqBody '[JSON] TeamSearchVisibility :> Get '[JSON] NoContent ) + :<|> Named "get-route-outlook-cal-config" (MkFeatureGetRoute OutlookCalIntegrationConfig) + :<|> Named "put-route-outlook-cal-config" (MkFeaturePutRouteTrivialConfigNoTTL OutlookCalIntegrationConfig) :<|> Named "get-team-invoice" ( Summary "Get a specific invoice by Number"