Просмотр исходного кода

Merge pull request #21520 from overleaf/mf-fedramp-ad

[web][will merge 17 march 2025] Add "FedRamp" advertisement variant to the US Gov banner list with a special rule

GitOrigin-RevId: 86f96c6c108f72b44658dca53d2cecabf0fe9d14
M Fahru 1 год назад
Родитель
Сommit
ec13227fc6

+ 1 - 1
services/web/app/src/Features/Project/ProjectListController.mjs

@@ -350,7 +350,7 @@ async function projectListPage(req, res, next) {
     'getUSGovBanner',
     userEmails,
     hasPaidAffiliation,
-    inactiveTutorials.includes('us-gov-banner')
+    inactiveTutorials
   )
 
   const usGovBanner = (usGovBannerHooksResponse &&

+ 1 - 0
services/web/app/src/Features/Tutorial/TutorialController.mjs

@@ -11,6 +11,7 @@ const VALID_KEYS = [
   'code-editor-mode-prompt',
   'history-restore-promo',
   'us-gov-banner',
+  'us-gov-banner-fedramp',
 ]
 
 async function completeTutorial(req, res, next) {

+ 1 - 0
services/web/frontend/extracted-translations.json

@@ -1925,6 +1925,7 @@
   "upload_project": "",
   "upload_zipped_project": "",
   "url_to_fetch_the_file_from": "",
+  "us_gov_banner_fedramp": "",
   "us_gov_banner_government_purchasing": "",
   "us_gov_banner_small_business_reseller": "",
   "usage_metrics": "",

+ 1 - 0
services/web/locales/en.json

@@ -2461,6 +2461,7 @@
   "upload_project": "Upload Project",
   "upload_zipped_project": "Upload Zipped Project",
   "url_to_fetch_the_file_from": "URL to fetch the file from",
+  "us_gov_banner_fedramp": "<0>Now FedRAMP® authorized for LI-SaaS: </0>Overleaf’s Group Professional subscription. Need an air-gapped deployment? We offer an on-premises solution too. Talk to our US federal government team.",
   "us_gov_banner_government_purchasing": "<0>Get __appName__ for US federal government. </0>Move faster through procurement with our tailored purchasing options. Talk to our government team.",
   "us_gov_banner_small_business_reseller": "<0>Easy procurement for US federal government. </0>We partner with small business resellers to help you buy Overleaf organizational plans. Talk to our government team.",
   "usage_metrics": "Usage metrics",

+ 1 - 1
services/web/test/unit/src/Project/ProjectListControllerTests.mjs

@@ -692,7 +692,7 @@ describe('ProjectListController', function () {
 
           this.UserGetter.promises.getUserFullEmails.resolves(emails)
           this.Modules.promises.hooks.fire
-            .withArgs('getUSGovBanner', emails, false, false)
+            .withArgs('getUSGovBanner', emails, false, [])
             .resolves([
               {
                 showUSGovBanner: true,

+ 1 - 0
services/web/types/project/dashboard/notification.ts

@@ -110,5 +110,6 @@ export type GroupsAndEnterpriseBannerVariant =
 export const USGovBannerVariants = [
   'government-purchasing',
   'small-business-reseller',
+  'fedramp',
 ] as const
 export type USGovBannerVariant = (typeof USGovBannerVariants)[number]