Skip to content

Commit

Permalink
add check if workshop is deleted
Browse files Browse the repository at this point in the history
  • Loading branch information
mrothauer committed Mar 5, 2025
1 parent 1d04f7f commit 98172a1
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/Policy/FundingsPolicy.php
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,16 @@ public function canAccess($identity, ServerRequest $request): bool|ResultInterfa

// only approved orgas are allowed to edit fundings
$workshopsTable = TableRegistry::getTableLocator()->get('Workshops');
$workshop = $this->find('all',
conditions: [
'Workshops.uid' => $workshopUid,
'Workshops.status >= ' . APP_OFF
]
)->first();
if (empty($workshop)) {
return false;
}

$workshop = $workshopsTable->getWorkshopForIsUserInOrgaTeamCheck($workshopUid);
if ($workshopsTable->isUserInOrgaTeam($identity, $workshop)) {
return true;
Expand Down

0 comments on commit 98172a1

Please sign in to comment.