|
@@ -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",
|
|
|
+ };
|
|
|
+ });
|
|
|
+ }
|
|
|
});
|
|
|
},
|
|
|
};
|