From d41a0ea6350b36048fa9d42c0ab02e0bed175159 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20D=C4=9Bdi=C4=8D?= Date: Fri, 22 Sep 2023 17:14:00 +0200 Subject: [PATCH] Fixed Education presenter checking general event update permission instead of Education event update permission --- .../EducationModule/presenters/BasePresenter.php | 4 ++-- app/model/Auth/Resources/Education.php | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/app/AccountancyModule/EducationModule/presenters/BasePresenter.php b/app/AccountancyModule/EducationModule/presenters/BasePresenter.php index 012f18168..ba5146753 100644 --- a/app/AccountancyModule/EducationModule/presenters/BasePresenter.php +++ b/app/AccountancyModule/EducationModule/presenters/BasePresenter.php @@ -4,7 +4,7 @@ namespace App\AccountancyModule\EducationModule; -use Model\Auth\Resources\Event as ResourceEvent; +use Model\Auth\Resources\Education as ResourceEducation; use Model\Cashbook\ObjectType; use Model\Event\Education; use Model\Event\Exception\EducationNotFound; @@ -41,7 +41,7 @@ protected function startup(): void $this->template->setParameters([ 'event' => $this->event, - 'isEditable' => $this->isEditable = $this->authorizator->isAllowed(ResourceEvent::UPDATE, $this->aid), + 'isEditable' => $this->isEditable = $this->authorizator->isAllowed(ResourceEducation::UPDATE, $this->aid), ]); } diff --git a/app/model/Auth/Resources/Education.php b/app/model/Auth/Resources/Education.php index 093d3ada1..f5ab9a754 100644 --- a/app/model/Auth/Resources/Education.php +++ b/app/model/Auth/Resources/Education.php @@ -17,5 +17,7 @@ final class Education public const ACCESS_PARTICIPANTS = [self::class, 'EV_ParticipantEducation_ALL_EventEducation']; public const UPDATE_PARTICIPANT = [self::class, 'EV_ParticipantEducation_UPDATE_EventEducation']; + public const UPDATE = [self::class, 'EV_EventEducation_UPDATE']; + public const UPDATE_REAL_BUDGET_SPENDING = [self::class, 'GR_Statement_UPDATE_EventEducationReal']; }