Skip to content

Commit

Permalink
Fixed Education presenter checking general event update permission in…
Browse files Browse the repository at this point in the history
…stead of Education event update permission
  • Loading branch information
marekdedic committed Sep 22, 2023
1 parent 3dad5c8 commit d41a0ea
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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),
]);
}

Expand Down
2 changes: 2 additions & 0 deletions app/model/Auth/Resources/Education.php
Original file line number Diff line number Diff line change
Expand Up @@ -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'];
}

0 comments on commit d41a0ea

Please sign in to comment.