Skip to content

Commit

Permalink
Merge pull request #2307 from marekdedic/education-event-authorizatio…
Browse files Browse the repository at this point in the history
…n-fix

Fixed Education presenter checking general event update permission instead of Education event update permission
  • Loading branch information
sinacek authored Oct 4, 2023
2 parents c533daf + d41a0ea commit e69180d
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 e69180d

Please sign in to comment.