From c320d58f0cc407fa9e553f88eb6228a08d78de0e Mon Sep 17 00:00:00 2001 From: Anvit Srivastav Date: Tue, 12 Sep 2023 14:15:46 -0700 Subject: [PATCH] Remove button ID, update admin check condition --- .../default/actions/bs2DeprecationMessageComponent.class.php | 2 +- apps/qubit/modules/default/templates/_bs2DeprecationMessage.php | 2 +- js/bs2DeprecationMessage.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/qubit/modules/default/actions/bs2DeprecationMessageComponent.class.php b/apps/qubit/modules/default/actions/bs2DeprecationMessageComponent.class.php index a9ddf43ce0..39335f80d0 100644 --- a/apps/qubit/modules/default/actions/bs2DeprecationMessageComponent.class.php +++ b/apps/qubit/modules/default/actions/bs2DeprecationMessageComponent.class.php @@ -26,7 +26,7 @@ class DefaultBS2DeprecationMessageComponent extends sfComponent { public function execute($request) { - $hasTranslateOrEditAccess = QubitAcl::check(QubitInformationObject, 'update') + $hasTranslateOrEditAccess = $this->context->user->isAdministrator() || $this->getUser()->hasGroup(QubitAclGroup::TRANSLATOR_ID) || $this->getUser()->hasGroup(QubitAclGroup::EDITOR_ID); diff --git a/apps/qubit/modules/default/templates/_bs2DeprecationMessage.php b/apps/qubit/modules/default/templates/_bs2DeprecationMessage.php index b6172f6625..da06a17a58 100644 --- a/apps/qubit/modules/default/templates/_bs2DeprecationMessage.php +++ b/apps/qubit/modules/default/templates/_bs2DeprecationMessage.php @@ -5,6 +5,6 @@
'', '%2%' => '']); ?>
- + diff --git a/js/bs2DeprecationMessage.js b/js/bs2DeprecationMessage.js index 022ceff12c..5b7f3d9f52 100644 --- a/js/bs2DeprecationMessage.js +++ b/js/bs2DeprecationMessage.js @@ -5,7 +5,7 @@ class Bs2DeprecationMessage { constructor(element) { this.$block = $(element); - this.$button = this.$block.find('#bs2-message-button'); + this.$button = this.$block.find('button'); this.listen(); }