diff --git a/services/web/app/src/Features/Project/ProjectController.js b/services/web/app/src/Features/Project/ProjectController.js index c5a3633225..86ef0bc50f 100644 --- a/services/web/app/src/Features/Project/ProjectController.js +++ b/services/web/app/src/Features/Project/ProjectController.js @@ -801,7 +801,8 @@ const ProjectController = { Boolean(project.overleaf.history.display), brandVariation, allowedImageNames: Settings.allowedImageNames || [], - gitBridgePublicBaseUrl: Settings.gitBridgePublicBaseUrl + gitBridgePublicBaseUrl: Settings.gitBridgePublicBaseUrl, + showSupport: Features.hasFeature('support') }) timer.done() } diff --git a/services/web/app/src/infrastructure/Features.js b/services/web/app/src/infrastructure/Features.js index f26c302234..9523d440d4 100644 --- a/services/web/app/src/infrastructure/Features.js +++ b/services/web/app/src/infrastructure/Features.js @@ -17,6 +17,10 @@ const publicRegistrationModuleAvailable = fs.existsSync( `${__dirname}/../../../modules/public-registration` ) +const supportModuleAvailable = fs.existsSync( + `${__dirname}/../../../modules/support` +) + module.exports = Features = { externalAuthenticationSystemUsed() { return ( @@ -61,9 +65,10 @@ module.exports = Features = { return Settings.enableSaml case 'link-url': return Settings.apis.linkedUrlProxy && Settings.apis.linkedUrlProxy.url - case 'public-registration': return publicRegistrationModuleAvailable + case 'support': + return supportModuleAvailable default: throw new Error(`unknown feature: ${feature}`) } diff --git a/services/web/app/views/project/editor/left-menu.pug b/services/web/app/views/project/editor/left-menu.pug index 5fb8e1ac06..dd07ee4617 100644 --- a/services/web/app/views/project/editor/left-menu.pug +++ b/services/web/app/views/project/editor/left-menu.pug @@ -208,14 +208,15 @@ aside#left-menu.full-size( a(ng-click="openHotkeysModal()") i.fa.fa-keyboard-o.fa-fw |    #{translate("show_hotkeys")} - li - a(href='/learn', target="_blank") - i.fa.fa-book.fa-fw - |    #{translate('documentation')} - li - a(ng-controller="ContactModal", ng-click="contactUsModal()") - i.fa.fa-question.fa-fw - |    #{translate("contact_us")} + if showSupport + li + a(href='/learn', target="_blank") + i.fa.fa-book.fa-fw + |    #{translate('documentation')} + li + a(ng-controller="ContactModal", ng-click="contactUsModal()") + i.fa.fa-question.fa-fw + |    #{translate("contact_us")} #left-menu-mask( ng-show="ui.leftMenuShown",