TsuyoshiSuzukief 7 лет назад
Родитель
Сommit
d187ae5174
2 измененных файлов с 6 добавлено и 0 удалено
  1. 1 0
      src/client/js/components/SavePageControls.jsx
  2. 5 0
      src/server/models/config.js

+ 1 - 0
src/client/js/components/SavePageControls.jsx

@@ -41,6 +41,7 @@ class SavePageControls extends React.PureComponent {
 
   render() {
     const { t } = this.props;
+
     const config = this.props.crowi.getConfig();
     const aclEnable = config.isEnabledAcl;
     const label = this.state.pageId == null ? t('Create') : t('Update');

+ 5 - 0
src/server/models/config.js

@@ -329,6 +329,11 @@ module.exports = function(crowi) {
   };
 
   configSchema.statics.isGuesstAllowedToRead = function(config) {
+    // return true if puclic wiki mode
+    if (process.env.ACL_ENABLE === 'false') {
+      return true;
+    }
+
     // return false if undefined
     if (undefined === config.crowi || undefined === config.crowi['security:restrictGuestMode']) {
       return false;