Explorar o código

GW-6462 Render forbidden.html when link sharing is disabled

hakumizuki %!s(int64=4) %!d(string=hai) anos
pai
achega
e1e20944b1
Modificáronse 1 ficheiros con 3 adicións e 0 borrados
  1. 3 0
      src/server/routes/page.js

+ 3 - 0
src/server/routes/page.js

@@ -413,6 +413,9 @@ module.exports = function(crowi, app) {
       // page or sharelink are not found
       return res.render('layout-growi/not_found_shared_page');
     }
+    if (crowi.configManager.getConfig('crowi', 'security:disableLinkSharing')) {
+      return res.render('layout-growi/forbidden');
+    }
 
     const renderVars = {};