mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-14 14:13:43 +01:00
Merge pull request #21683 from overleaf/msm-sso-admin-checkbox
[web] Change Group SSO radio in admin panel to checkbox GitOrigin-RevId: c4a07400c6f399724be0368108be24ec6df67efa
This commit is contained in:
+2
-4
@@ -10,10 +10,8 @@ export default function GroupSettingsButton({
|
|||||||
const { t } = useTranslation()
|
const { t } = useTranslation()
|
||||||
|
|
||||||
const subscriptionHasManagedUsers =
|
const subscriptionHasManagedUsers =
|
||||||
subscription.features?.managedUsers !== false
|
subscription.features?.managedUsers === true
|
||||||
const subscriptionHasGroupSSO =
|
const subscriptionHasGroupSSO = subscription.features?.groupSSO === true
|
||||||
subscription.features?.groupSSO === true ||
|
|
||||||
subscription.features?.groupSSO === null
|
|
||||||
|
|
||||||
let groupSettingRowSubText = ''
|
let groupSettingRowSubText = ''
|
||||||
if (subscriptionHasGroupSSO && subscriptionHasManagedUsers) {
|
if (subscriptionHasGroupSSO && subscriptionHasManagedUsers) {
|
||||||
|
|||||||
-19
@@ -83,8 +83,6 @@ const managedGroupSubscriptions3: ManagedGroupSubscription[] =
|
|||||||
getManagedGroupSubscriptions(true, false)
|
getManagedGroupSubscriptions(true, false)
|
||||||
const managedGroupSubscriptions4: ManagedGroupSubscription[] =
|
const managedGroupSubscriptions4: ManagedGroupSubscription[] =
|
||||||
getManagedGroupSubscriptions(false, true)
|
getManagedGroupSubscriptions(false, true)
|
||||||
const managedGroupSubscriptions5: ManagedGroupSubscription[] =
|
|
||||||
getManagedGroupSubscriptions(null, true)
|
|
||||||
|
|
||||||
describe('<ManagedGroupSubscriptions />', function () {
|
describe('<ManagedGroupSubscriptions />', function () {
|
||||||
afterEach(function () {
|
afterEach(function () {
|
||||||
@@ -196,23 +194,6 @@ describe('<ManagedGroupSubscriptions />', function () {
|
|||||||
await screen.findAllByText('Configure and manage SSO and Managed Users')
|
await screen.findAllByText('Configure and manage SSO and Managed Users')
|
||||||
})
|
})
|
||||||
|
|
||||||
it('renders Group SSO settings when the feature is null', async function () {
|
|
||||||
renderWithSubscriptionDashContext(<ManagedGroupSubscriptions />, {
|
|
||||||
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 () {
|
it('does not render Group SSO settings when the feature is turned off', async function () {
|
||||||
renderWithSubscriptionDashContext(<ManagedGroupSubscriptions />, {
|
renderWithSubscriptionDashContext(<ManagedGroupSubscriptions />, {
|
||||||
metaTags: [
|
metaTags: [
|
||||||
|
|||||||
Reference in New Issue
Block a user