Skip to content

Commit

Permalink
fix: Campaign library access
Browse files Browse the repository at this point in the history
  • Loading branch information
ammopt committed Nov 13, 2024
1 parent d5f7ced commit e33dc50
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions code/web/sys/Community/Campaign.php
Original file line number Diff line number Diff line change
Expand Up @@ -351,6 +351,8 @@ public function find($fetchFirst = false, $requireOneMatchToReturn = true): bool

$this->joinAdd(new CampaignPatronTypeAccess(), 'INNER', 'ce_campaign_patron_type_access', 'id', 'campaignId');
$this->whereAdd("ce_campaign_patron_type_access.patronTypeId = '" . UserAccount::getActiveUserObj()->getPTypeObj()->id . "'");
$this->joinAdd(new CampaignLibraryAccess(), 'INNER', 'ce_campaign_library_access', 'id', 'campaignId');
$this->whereAdd("ce_campaign_library_access.libraryId = '" . UserAccount::getActiveUserObj()->getHomeLibrary()->libraryId . "'");
return parent::find($fetchFirst, $requireOneMatchToReturn);
}

Expand Down

0 comments on commit e33dc50

Please sign in to comment.