mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-15 06:33:55 +01:00
[web] Read subscription.features on Group Management rendering (#36168)
* [web] Read subscription.features on Group Management rendering Fixes 'ai-toggling' not properly read on Group Management rendering, causing the Feature Controls option not being displayed in certain scenarios. GitOrigin-RevId: 4465fea15279d650d9d231e85072f1d85f2358be
This commit is contained in:
+4
-1
@@ -100,6 +100,7 @@ export default function ManagedGroupSubscriptions() {
|
||||
const isSharingPermissionsEnabled = useFeatureFlag(
|
||||
'sharing-updates-sharing-permissions'
|
||||
)
|
||||
const aiTogglingSplitTestEnabled = useFeatureFlag('ai-toggling')
|
||||
|
||||
if (!managedGroupSubscriptions) {
|
||||
return null
|
||||
@@ -116,9 +117,11 @@ export default function ManagedGroupSubscriptions() {
|
||||
|
||||
// Feature controls are currently rendered only for managed groups, where the admin can
|
||||
// toggle AI Feature on/off. For non-managed groups, the section only displays notifications
|
||||
// for features that have been disabled by Overleaf Support.
|
||||
// for features that have been disabled by Overleaf Support. When the `ai-toggling` split
|
||||
// test is enabled, it's always displayed for non-managed groups that have the feature on.
|
||||
// This flag will be deleted once AI Features toggling is available to all groups.
|
||||
const shouldDisplayFeatureControls =
|
||||
(subscription.features?.aiToggling && aiTogglingSplitTestEnabled) ||
|
||||
subscription.managedUsersEnabled ||
|
||||
subscription.groupPolicy?.userCannotUseAIFeatures ||
|
||||
subscription.groupPolicy?.userCannotUseChat ||
|
||||
|
||||
Reference in New Issue
Block a user