|
|
@@ -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;
|