Merge pull request #10772 from overleaf/em-ieee-brand-id

Make the IEEE brand id configurable

GitOrigin-RevId: 3ee286131d6ed8f43247ab1e2954eabec83d75d6
This commit is contained in:
Eric Mc Sween
2022-12-06 07:57:47 -05:00
committed by Copybot
parent 38df974ce1
commit 04d0eabb32
2 changed files with 6 additions and 3 deletions
@@ -21,6 +21,8 @@ const {
addOptionalCleanupHandlerAfterDrainingConnections,
} = require('./GracefulShutdown')
const IEEE_BRAND_ID = Settings.ieeeBrandId
let webpackManifest
switch (process.env.NODE_ENV) {
case 'production':
@@ -179,10 +181,8 @@ module.exports = function (webRouter, privateApiRouter, publicApiRouter) {
res.locals.moment = moment
const IEEE_BRAND_ID = 15
res.locals.isIEEE = brandVariation =>
(brandVariation != null ? brandVariation.brand_id : undefined) ===
IEEE_BRAND_ID
brandVariation?.brand_id === IEEE_BRAND_ID
res.locals.getCssThemeModifier = function (userSettings, brandVariation) {
// Themes only exist in OL v2
+3
View File
@@ -801,6 +801,9 @@ module.exports = {
unsupportedBrowsers: {
ie: '<=11',
},
// ID of the IEEE brand in the rails app
ieeeBrandId: intFromEnv('IEEE_BRAND_ID', 15),
}
module.exports.mergeWith = function (overrides) {