Sfoglia il codice sorgente

Fix broken /login endpoint

Penar Musaraj 4 anni fa
parent
commit
04d29231ea

+ 21 - 20
assets/javascripts/discourse/initializers/bbb.js.es6

@@ -83,28 +83,29 @@ export default {
         id: "discourse-bbb",
       });
 
-      if (siteSettings.bbb_staff_only && !currentUser.staff) {
-        return;
-      }
-
-      api.modifyClass("controller:composer", {
-        actions: {
-          insertBBBModal() {
-            showModal("insert-bbb").setProperties({
-              toolbarEvent: this.get("toolbarEvent"),
-            });
+      if (
+        !siteSettings.bbb_staff_only ||
+        (siteSettings.bbb_staff_only && currentUser && currentUser.staff)
+      ) {
+        api.modifyClass("controller:composer", {
+          actions: {
+            insertBBBModal() {
+              showModal("insert-bbb").setProperties({
+                toolbarEvent: this.get("toolbarEvent"),
+              });
+            },
           },
-        },
-      });
+        });
 
-      api.addToolbarPopupMenuOptionsCallback((controller) => {
-        return {
-          id: "insert-bbb",
-          icon: "video",
-          action: "insertBBBModal",
-          label: "bbb.composer_title",
-        };
-      });
+        api.addToolbarPopupMenuOptionsCallback((controller) => {
+          return {
+            id: "insert-bbb",
+            icon: "video",
+            action: "insertBBBModal",
+            label: "bbb.composer_title",
+          };
+        });
+      }
     });
   },
 };

+ 1 - 1
config/locales/client.en.yml

@@ -1,7 +1,7 @@
 en:
   js:
     bbb:
-      composer_title: Add BigBlueButton room
+      composer_title: Add BigBlueButton
       meetingID: Meeting ID
       button_text: Button label (optional)
       attendeePW: Attendee password