From d080218d965cbfd2bbbb693ce791c77eae3c819e Mon Sep 17 00:00:00 2001 From: Miguel Serrano Date: Wed, 20 Nov 2024 12:28:20 +0100 Subject: [PATCH] Merge pull request #21683 from overleaf/msm-sso-admin-checkbox [web] Change Group SSO radio in admin panel to checkbox GitOrigin-RevId: c4a07400c6f399724be0368108be24ec6df67efa --- .../dashboard/group-settings-button.tsx | 6 ++---- .../managed-group-subscriptions.test.tsx | 19 ------------------- 2 files changed, 2 insertions(+), 23 deletions(-) diff --git a/services/web/frontend/js/features/subscription/components/dashboard/group-settings-button.tsx b/services/web/frontend/js/features/subscription/components/dashboard/group-settings-button.tsx index d71a96595e..eb6876bd9e 100644 --- a/services/web/frontend/js/features/subscription/components/dashboard/group-settings-button.tsx +++ b/services/web/frontend/js/features/subscription/components/dashboard/group-settings-button.tsx @@ -10,10 +10,8 @@ export default function GroupSettingsButton({ const { t } = useTranslation() const subscriptionHasManagedUsers = - subscription.features?.managedUsers !== false - const subscriptionHasGroupSSO = - subscription.features?.groupSSO === true || - subscription.features?.groupSSO === null + subscription.features?.managedUsers === true + const subscriptionHasGroupSSO = subscription.features?.groupSSO === true let groupSettingRowSubText = '' if (subscriptionHasGroupSSO && subscriptionHasManagedUsers) { diff --git a/services/web/test/frontend/features/subscription/components/dashboard/managed-group-subscriptions.test.tsx b/services/web/test/frontend/features/subscription/components/dashboard/managed-group-subscriptions.test.tsx index a090e33211..18ed3ea124 100644 --- a/services/web/test/frontend/features/subscription/components/dashboard/managed-group-subscriptions.test.tsx +++ b/services/web/test/frontend/features/subscription/components/dashboard/managed-group-subscriptions.test.tsx @@ -83,8 +83,6 @@ const managedGroupSubscriptions3: ManagedGroupSubscription[] = getManagedGroupSubscriptions(true, false) const managedGroupSubscriptions4: ManagedGroupSubscription[] = getManagedGroupSubscriptions(false, true) -const managedGroupSubscriptions5: ManagedGroupSubscription[] = - getManagedGroupSubscriptions(null, true) describe('', function () { afterEach(function () { @@ -196,23 +194,6 @@ describe('', function () { await screen.findAllByText('Configure and manage SSO and Managed Users') }) - it('renders Group SSO settings when the feature is null', async function () { - renderWithSubscriptionDashContext(, { - metaTags: [ - { - name: 'ol-managedGroupSubscriptions', - value: managedGroupSubscriptions5, - }, - { - name: 'ol-groupSettingsEnabledFor', - value: [managedGroupSubscriptions5[0]._id], - }, - ], - }) - await screen.findAllByText('Manage group settings') - await screen.findAllByText('Configure and manage SSO and Managed Users') - }) - it('does not render Group SSO settings when the feature is turned off', async function () { renderWithSubscriptionDashContext(, { metaTags: [