diff --git a/services/web/app/src/Features/Subscription/SubscriptionController.js b/services/web/app/src/Features/Subscription/SubscriptionController.js
index def0abf7ac..6c2ad53a92 100644
--- a/services/web/app/src/Features/Subscription/SubscriptionController.js
+++ b/services/web/app/src/Features/Subscription/SubscriptionController.js
@@ -177,6 +177,10 @@ async function userSubscriptionPage(req, res) {
premiumSource: aiAssistViaWritefullSource,
} = await UserGetter.promises.getWritefullData(user._id)
+ // populate splitTestVariants in locals with a value for the split test, so
+ // it's available in meta ol-splitTestVariants in the browser
+ await SplitTestHandler.promises.getAssignment(req, res, 'group-audit-logs')
+
const data = {
title: 'your_subscription',
plans: plansData?.plans,
diff --git a/services/web/frontend/extracted-translations.json b/services/web/frontend/extracted-translations.json
index 982176c2e9..af65723998 100644
--- a/services/web/frontend/extracted-translations.json
+++ b/services/web/frontend/extracted-translations.json
@@ -161,6 +161,7 @@
"ask_repo_owner_to_reconnect": "",
"ask_repo_owner_to_renew_overleaf_subscription": "",
"at_most_x_libraries_can_be_selected": "",
+ "audit_logs": "",
"auto_close_brackets": "",
"auto_compile": "",
"auto_complete": "",
@@ -2050,6 +2051,7 @@
"verify_email_address_before_enabling_managed_users": "",
"view": "",
"view_all": "",
+ "view_audit_logs_group_subtext": "",
"view_billing_details": "",
"view_code": "",
"view_configuration": "",
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 a79cac06ac..0ad9274af6 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,10 @@ export default function ManagedGroupSubscriptions() {
getMeta('ol-groupSettingsAdvertisedFor') || []
const groupSettingsEnabledFor = getMeta('ol-groupSettingsEnabledFor') || []
+ const splitTestVariants = getMeta('ol-splitTestVariants')
+ const displayAuditLogsLink =
+ splitTestVariants?.['group-audit-logs'] === 'active'
+
return (
<>
{managedGroupSubscriptions.map(subscription => {
@@ -125,6 +129,14 @@ export default function ManagedGroupSubscriptions() {
{groupSettingsAdvertisedFor?.includes(subscription._id) && (
)}
+ {displayAuditLogsLink && (
+
+ )}
__repoOwnerEmail__0>) to reconnect the project.",
"ask_repo_owner_to_renew_overleaf_subscription": "Ask the GitHub repository owner (<0>__repoOwnerEmail__0>) to renew their __appName__ subscription and reconnect the project.",
"at_most_x_libraries_can_be_selected": "At most __maxCount__ libraries can be selected",
+ "audit_logs": "Audit logs",
"august": "August",
"author": "Author",
"auto_close_brackets": "Auto-close brackets",
@@ -2594,6 +2595,7 @@
"verify_email_address_before_enabling_managed_users": "You need to verify your email address before enabling managed users.",
"view": "View",
"view_all": "View all",
+ "view_audit_logs_group_subtext": "View and download audit logs for your group subscription",
"view_billing_details": "View billing details",
"view_code": "View code",
"view_configuration": "View configuration",
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 b4e701e5b5..76a334e410 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
@@ -97,6 +97,10 @@ describe('', function () {
value: managedGroupSubscriptions,
},
{ name: 'ol-usersEmail', value: 'admin@example.com' },
+ {
+ name: 'ol-splitTestVariants',
+ value: { 'group-audit-logs': 'active' },
+ },
],
})
@@ -124,28 +128,31 @@ describe('', function () {
expect(links[2].getAttribute('href')).to.equal(
'/manage/groups/bcd567/managers'
)
- expect(links[3].getAttribute('href')).to.equal('/metrics/groups/bcd567')
- expect(links[5].getAttribute('href')).to.equal(
+ expect(links[3].getAttribute('href')).to.equal(
+ '/manage/groups/bcd567/audit-logs'
+ )
+ expect(links[4].getAttribute('href')).to.equal('/metrics/groups/bcd567')
+ expect(links[6].getAttribute('href')).to.equal(
'/manage/groups/def456/members'
)
- expect(links[6].getAttribute('href')).to.equal(
+ expect(links[7].getAttribute('href')).to.equal(
'/manage/groups/def456/managers'
)
- expect(links[7].getAttribute('href')).to.equal('/metrics/groups/def456')
- expect(links[9].getAttribute('href')).to.equal(
+ expect(links[9].getAttribute('href')).to.equal('/metrics/groups/def456')
+ expect(links[11].getAttribute('href')).to.equal(
'/manage/groups/group2abc/members'
)
- expect(links[10].getAttribute('href')).to.equal(
+ expect(links[12].getAttribute('href')).to.equal(
'/manage/groups/group2abc/managers'
)
- expect(links[11].getAttribute('href')).to.equal('/metrics/groups/group2abc')
- expect(links[13].getAttribute('href')).to.equal(
+ expect(links[14].getAttribute('href')).to.equal('/metrics/groups/group2abc')
+ expect(links[16].getAttribute('href')).to.equal(
'/manage/groups/group123abc/members'
)
- expect(links[14].getAttribute('href')).to.equal(
+ expect(links[17].getAttribute('href')).to.equal(
'/manage/groups/group123abc/managers'
)
- expect(links[15].getAttribute('href')).to.equal(
+ expect(links[19].getAttribute('href')).to.equal(
'/metrics/groups/group123abc'
)
})