Procházet zdrojové kódy

wikiMode -> isAclEnabled

Shun Miyazawa před 3 roky
rodič
revize
3057ba09a8
1 změnil soubory, kde provedl 2 přidání a 2 odebrání
  1. 2 2
      packages/app/src/server/routes/attachment.js

+ 2 - 2
packages/app/src/server/routes/attachment.js

@@ -468,8 +468,8 @@ module.exports = function(crowi, app) {
     if (pageId == null) {
       logger.debug('Create page before file upload');
 
-      const wikiMode = crowi.configManager.getConfig('crowi', 'security:wikiMode');
-      const grant = wikiMode === 'public' ? Page.GRANT_PUBLIC : Page.GRANT_OWNER;
+      const isAclEnabled = crowi.aclService.isAclEnabled();
+      const grant = isAclEnabled ? Page.GRANT_OWNER : Page.GRANT_PUBLIC;
 
       page = await crowi.pageService.create(pagePath, `# ${pagePath}`, req.user, { grant });
       pageCreated = true;