kaori 5 лет назад
Родитель
Сommit
dc97114483
1 измененных файлов с 2 добавлено и 1 удалено
  1. 2 1
      src/client/js/legacy/crowi.js

+ 2 - 1
src/client/js/legacy/crowi.js

@@ -201,6 +201,7 @@ $(() => {
 
 window.addEventListener('load', (e) => {
   const { appContainer, pageContainer } = window;
+  const { currentUser } = appContainer;
   const {
     isPageExist, isPageForbidden, isNotCreatable, isTrashPage,
   } = pageContainer.state;
@@ -209,7 +210,7 @@ window.addEventListener('load', (e) => {
   if (window.location.hash) {
     const navigationContainer = appContainer.getContainer('NavigationContainer');
 
-    if (window.location.hash === '#edit' && isPageExist && !isPageForbidden && !isNotCreatable && !isTrashPage) {
+    if (window.location.hash === '#edit' && isPageExist && (currentUser != null) && !isPageForbidden && !isNotCreatable && !isTrashPage) {
       navigationContainer.setEditorMode('edit');
 
       // focus