diff --git a/services/web/app/src/Features/Subscription/SubscriptionController.mjs b/services/web/app/src/Features/Subscription/SubscriptionController.mjs index 888ca1c344..8c0f95b420 100644 --- a/services/web/app/src/Features/Subscription/SubscriptionController.mjs +++ b/services/web/app/src/Features/Subscription/SubscriptionController.mjs @@ -155,6 +155,11 @@ function formatGroupPlansDataForDash() { async function userSubscriptionPage(req, res) { const user = SessionManager.getSessionUser(req.session) await SplitTestHandler.promises.getAssignment(req, res, 'sharing-updates') + await SplitTestHandler.promises.getAssignment( + req, + res, + 'sharing-updates-sharing-permissions' + ) await SplitTestHandler.promises.getAssignment(req, res, 'pause-subscription') await SplitTestHandler.promises.getAssignment( req, diff --git a/services/web/frontend/js/features/subscription/components/dashboard/managed-group-subscriptions.tsx b/services/web/frontend/js/features/subscription/components/dashboard/managed-group-subscriptions.tsx index 19475b998e..752785e068 100644 --- a/services/web/frontend/js/features/subscription/components/dashboard/managed-group-subscriptions.tsx +++ b/services/web/frontend/js/features/subscription/components/dashboard/managed-group-subscriptions.tsx @@ -97,6 +97,9 @@ export default function ManagedGroupSubscriptions() { const combinedUserManagement = useFeatureFlag('combined-user-management') const isSharingUpdatesEnabled = useFeatureFlag('sharing-updates') + const isSharingPermissionsEnabled = useFeatureFlag( + 'sharing-updates-sharing-permissions' + ) if (!managedGroupSubscriptions) { return null @@ -161,6 +164,7 @@ export default function ManagedGroupSubscriptions() { {isAdmin && ( <> {isSharingUpdatesEnabled && + isSharingPermissionsEnabled && subscription.planLevelName === 'Pro' && ( ', function () { { name: 'ol-usersEmail', value: 'you@example.com' }, { name: 'ol-splitTestVariants', - value: { 'sharing-updates': 'enabled' }, + value: { + 'sharing-updates': 'enabled', + 'sharing-updates-sharing-permissions': 'enabled', + }, }, ], }) @@ -254,6 +257,26 @@ describe('', function () { await screen.findAllByText(/manage how group members share projects/i) }) + it('does not render the Sharing Permissions settings row when the "sharing-updates-sharing-permissions" feature flag is disabled', function () { + renderWithSubscriptionDashContext(, { + metaTags: [ + { + name: 'ol-managedGroupSubscriptions', + value: managedGroupSubscriptions, + }, + { name: 'ol-usersEmail', value: 'you@example.com' }, + { + name: 'ol-splitTestVariants', + value: { 'sharing-updates': 'enabled' }, + }, + ], + }) + + expect(screen.queryByText(/sharing permissions/i)).to.be.null + expect(screen.queryByText(/manage how group members share projects/i)).to.be + .null + }) + it('renders Managed Group / Group SSO settings row when both features are turned on', async function () { renderWithSubscriptionDashContext(, { metaTags: [