diff --git a/services/web/app/src/infrastructure/Features.js b/services/web/app/src/infrastructure/Features.js index f58fadec9e..1249be9dba 100644 --- a/services/web/app/src/infrastructure/Features.js +++ b/services/web/app/src/infrastructure/Features.js @@ -53,6 +53,8 @@ module.exports = Features = { return Settings.apis.references.url != null case 'saml': return Settings.enableSaml + case 'link-url': + return Settings.apis.linkedUrlProxy && Settings.apis.linkedUrlProxy.url default: throw new Error(`unknown feature: ${feature}`) } diff --git a/services/web/app/views/project/editor/new-file-modal.pug b/services/web/app/views/project/editor/new-file-modal.pug index df8b6d0133..47dff03a55 100644 --- a/services/web/app/views/project/editor/new-file-modal.pug +++ b/services/web/app/views/project/editor/new-file-modal.pug @@ -21,11 +21,12 @@ script(type='text/ng-template', id='newFileModalTemplate') i.fa.fa-fw.fa-folder-open | | From Another Project - li(ng-class="type == 'url' ? 'active' : null") - a(href, ng-click="type = 'url'") - i.fa.fa-fw.fa-globe - | - | From External URL + if hasFeature('link-url') + li(ng-class="type == 'url' ? 'active' : null") + a(href, ng-click="type = 'url'") + i.fa.fa-fw.fa-globe + | + | From External URL != moduleIncludes("newFileModal:selector", locals) td(class="modal-new-file--body modal-new-file--body-{{type}}")