Przeglądaj źródła

Merge pull request #3071 from weseek/fix/can-create-page-if-guest-user-push-c-button

Fix/can create page if guest user push c button
Yuki Takei 5 lat temu
rodzic
commit
a4396e674b
1 zmienionych plików z 4 dodań i 0 usunięć
  1. 4 0
      src/client/js/services/NavigationContainer.js

+ 4 - 0
src/client/js/services/NavigationContainer.js

@@ -176,6 +176,10 @@ export default class NavigationContainer extends Container {
   }
 
   openPageCreateModal() {
+    if (this.appContainer.currentUser == null) {
+      logger.warn('Please login or signup to create a new page.');
+      return;
+    }
     this.setState({ isPageCreateModalShown: true });
   }