Kaynağa Gözat

set initial value to null

Shun Miyazawa 4 yıl önce
ebeveyn
işleme
a1dc61854d

+ 1 - 1
packages/app/.env.development

@@ -23,7 +23,7 @@ OGP_URI="http://ogp:8088"
 # PUBLISH_OPEN_API=true
 # USER_UPPER_LIMIT=0
 # DEV_HTTPS=true
-# FORCE_WIKI_MODE=private
+FORCE_WIKI_MODE=public
 # PROMSTER_ENABLED=true
 # SLACKBOT_WITHOUT_PROXY_SIGNING_SECRET=''
 # SLACKBOT_WITHOUT_PROXY_BOT_TOKEN=''

+ 2 - 2
packages/app/src/client/services/AdminGeneralSecurityContainer.js

@@ -30,8 +30,8 @@ export default class AdminGeneralSecurityContainer extends Container {
       currentPageRecursiveDeletionAuthority: PageRecursiveDeleteConfigValue.Inherit,
       currentPageCompleteDeletionAuthority: PageSingleDeleteCompConfigValue.AdminOnly,
       currentPageRecursiveCompleteDeletionAuthority: PageRecursiveDeleteCompConfigValue.Inherit,
-      previousPageRecursiveDeletionAuthority: '',
-      previousPageRecursiveCompleteDeletionAuthority: '',
+      previousPageRecursiveDeletionAuthority: null,
+      previousPageRecursiveCompleteDeletionAuthority: null,
       expandOtherOptionsForDeletion: false,
       expandOtherOptionsForCompleteDeletion: false,
       isShowRestrictedByOwner: false,

+ 3 - 3
packages/app/src/components/Admin/Security/SecuritySetting.jsx

@@ -162,8 +162,8 @@ class SecuritySetting extends React.Component {
   setDeletionConfigState(newState, setState, deletionType) {
     setState(newState);
 
-    if (this.previousPageRecursiveAuthorityState(deletionType) !== '') {
-      this.setPagePreviousRecursiveAuthorityState(deletionType, '');
+    if (this.previousPageRecursiveAuthorityState(deletionType) !== null) {
+      this.setPagePreviousRecursiveAuthorityState(deletionType, null);
     }
 
     if (isRecursiveDeletion(deletionType)) {
@@ -286,7 +286,7 @@ class SecuritySetting extends React.Component {
                           <span dangerouslySetInnerHTML={{ __html: t('security_setting.page_delete_rights_caution') }} />
                         </span>
                       </p>
-                      { this.previousPageRecursiveAuthorityState(deletionType) !== '' && (
+                      { this.previousPageRecursiveAuthorityState(deletionType) !== null && (
                         <div className="mb-3">
                           <strong>
                             {t('security_setting.forced_update_desc')}