Skip to content

Commit

Permalink
Ref revive-adserver#1517 Hide Advertiser / website stats from admins
Browse files Browse the repository at this point in the history
  • Loading branch information
mbeccati committed Jul 12, 2024
1 parent 238bc27 commit ce77f64
Show file tree
Hide file tree
Showing 31 changed files with 31 additions and 71 deletions.
42 changes: 1 addition & 41 deletions lib/OA/Admin/Menu/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,47 +26,7 @@ function _buildNavigation($accountType)
}

// Note: The stats screens haven't been updated to use the new menuing names...
$oMenu->add(new OA_Admin_Menu_Section("2", 'Stats', "stats.php", false, "statistics"));
$oMenu->addTo("2", new OA_Admin_Menu_Section("2.1", 'ClientsAndCampaigns', "stats.php?1=1", false, "statistics/advertisersAndCampaigns"));
$oMenu->addTo("2.1", new OA_Admin_Menu_Section("2.1.1", 'ClientHistory', "stats.php?entity=advertiser&breakdown=history&clientid={clientid}", false, "statistics/advertiserHistory"));
$oMenu->addTo("2.1.1", new OA_Admin_Menu_Section("2.1.1.1", 'DailyStats', "stats.php?entity=advertiser&breakdown=daily&clientid={clientid}&day={day}", false, "statistics/advertiserHistory/daily"));
$oMenu->addTo("2.1", new OA_Admin_Menu_Section("2.1.2", 'Campaigns', "stats.php?entity=advertiser&breakdown=campaigns&clientid={clientid}", false, "statistics/campaignOverview"));
$oMenu->addTo("2.1.2", new OA_Admin_Menu_Section("2.1.2.1", 'CampaignHistory', "stats.php?entity=campaign&breakdown=history&clientid={clientid}&campaignid={campaignid}", false, "statistics/campaignHistory"));
$oMenu->addTo("2.1.2.1", new OA_Admin_Menu_Section("2.1.2.1.1", 'DailyStats', "stats.php?entity=campaign&breakdown=daily&clientid={clientid}&campaignid={campaignid}&day={day}", false, "statistics/campaignHistory/daily"));
$oMenu->addTo("2.1.2", new OA_Admin_Menu_Section("2.1.2.2", 'Banners', "stats.php?entity=campaign&breakdown=banners&clientid={clientid}&campaignid={campaignid}", false, "statistics/bannerOverview"));
$oMenu->addTo("2.1.2.2", new OA_Admin_Menu_Section("2.1.2.2.1", 'BannerHistory', "stats.php?entity=banner&breakdown=history&clientid={clientid}&campaignid={campaignid}&bannerid={bannerid}", false, "statistics/bannerHistory"));
$oMenu->addTo("2.1.2.2.1", new OA_Admin_Menu_Section("2.1.2.2.1.1", 'DailyStats', "stats.php?entity=banner&breakdown=daily&clientid={clientid}&campaignid={campaignid}&bannerid={bannerid}&day={day}", false, "statistics/bannerHistory/daily"));
$oMenu->addTo("2.1.2.2", new OA_Admin_Menu_Section("2.1.2.2.2", 'PublisherDistribution', "stats.php?entity=banner&breakdown=affiliates&clientid={clientid}&campaignid={campaignid}&bannerid={bannerid}", false, "statistics/publisherDistribution"));
$oMenu->addTo("2.1.2.2.2", new OA_Admin_Menu_Section("2.1.2.2.2.1", 'DistributionHistoryWebsite', "stats.php?entity=banner&breakdown=affiliate-history&clientid={clientid}&campaignid={campaignid}&bannerid={bannerid}&affiliateid={affiliateid}", true, "statistics/publisherDistribution/history"));
$oMenu->addTo("2.1.2.2.2.1", new OA_Admin_Menu_Section("2.1.2.2.2.1.1", 'DailyStats', "stats.php?entity=banner&breakdown=daily&clientid={clientid}&campaignid={campaignid}&bannerid={bannerid}&affiliateid={affiliateid}&day={day}", false, "statistics/publisherDistribution/history/daily"));
$oMenu->addTo("2.1.2.2.2", new OA_Admin_Menu_Section("2.1.2.2.2.2", 'DistributionHistoryZone', "stats.php?entity=banner&breakdown=zone-history&clientid={clientid}&campaignid={campaignid}&bannerid={bannerid}&affiliateid={affiliateid}&zoneid={zoneid}", true));
$oMenu->addTo("2.1.2.2.2.2", new OA_Admin_Menu_Section("2.1.2.2.2.2.1", 'DailyStats', "stats.php?entity=banner&breakdown=daily&clientid={clientid}&campaignid={campaignid}&bannerid={bannerid}&affiliateid={affiliateid}&zoneid={zoneid}&day={day}"));
$oMenu->addTo("2.1.2", new OA_Admin_Menu_Section("2.1.2.3", 'PublisherDistribution', "stats.php?entity=campaign&breakdown=affiliates&clientid={clientid}&campaignid={campaignid}", false, "statistics/publisherDistribution"));
$oMenu->addTo("2.1.2.3", new OA_Admin_Menu_Section("2.1.2.3.1", 'DistributionHistoryWebsite', "stats.php?entity=campaign&breakdown=affiliate-history&clientid={clientid}&campaignid={campaignid}&affiliateid={affiliateid}", true, "statistics/publisherDistribution/history"));
$oMenu->addTo("2.1.2.3.1", new OA_Admin_Menu_Section("2.1.2.3.1.1", 'DailyStats', "stats.php?entity=campaign&breakdown=daily&clientid={clientid}&campaignid={campaignid}&affiliateid={affiliateid}&day={day}", false, "statistics/publisherDistribution/history/daily"));
$oMenu->addTo("2.1.2.3", new OA_Admin_Menu_Section("2.1.2.3.2", 'DistributionHistoryZone', "stats.php?entity=campaign&breakdown=zone-history&clientid={clientid}&campaignid={campaignid}&affiliateid={affiliateid}&zoneid={zoneid}", true));
$oMenu->addTo("2.1.2.3.2", new OA_Admin_Menu_Section("2.1.2.3.2.1", 'DailyStats', "stats.php?entity=advertiser&breakdown=daily&clientid={clientid}&campaignid={campaignid}&affiliateid={affiliateid}&zoneid={zoneid}&day={day}"));
$oMenu->addTo("2.1", new OA_Admin_Menu_Section("2.1.3", 'PublisherDistribution', "stats.php?entity=advertiser&breakdown=affiliates&clientid={clientid}", false, "statistics/publisherDistribution"));
$oMenu->addTo("2.1.3", new OA_Admin_Menu_Section("2.1.3.1", 'DistributionHistoryWebsite', "stats.php?entity=advertiser&breakdown=affiliate-history&clientid={clientid}&affiliateid={affiliateid}", true, "statistics/publisherDistribution/history"));
$oMenu->addTo("2.1.3.1", new OA_Admin_Menu_Section("2.1.3.1.1", 'DailyStats', "stats.php?entity=advertiser&breakdown=daily&clientid={clientid}&affiliateid={affiliateid}&day={day}", false, "statistics/publisherDistribution/history/daily"));
$oMenu->addTo("2.1.3", new OA_Admin_Menu_Section("2.1.3.2", 'DistributionHistoryZone', "stats.php?entity=advertiser&breakdown=zone-history&clientid={clientid}&affiliateid={affiliateid}&zoneid={zoneid}", true));
$oMenu->addTo("2.1.3.2", new OA_Admin_Menu_Section("2.1.3.2.1", 'DailyStats', "stats.php?entity=advertiser&breakdown=daily&clientid={clientid}&affiliateid={affiliateid}&zoneid={zoneid}&day={day}"));
$oMenu->addTo("2", new OA_Admin_Menu_Section("2.4", 'AffiliatesAndZones', "stats.php?entity=global&breakdown=affiliates", false, "statistics/publishersAndZones"));
$oMenu->addTo("2.4", new OA_Admin_Menu_Section("2.4.1", 'AffiliateHistory', "stats.php?entity=affiliate&breakdown=history&affiliateid={affiliateid}", false, "statistics/publisherHistory"));
$oMenu->addTo("2.4.1", new OA_Admin_Menu_Section("2.4.1.1", 'DailyStats', "stats.php?entity=affiliate&breakdown=daily&affiliateid={affiliateid}&day={day}", false, "statistics/publisherHistory/daily"));
$oMenu->addTo("2.4", new OA_Admin_Menu_Section("2.4.2", 'Zones', "stats.php?entity=affiliate&breakdown=zones&affiliateid={affiliateid}", false, "statistics/zoneOverview"));
$oMenu->addTo("2.4.2", new OA_Admin_Menu_Section("2.4.2.1", 'ZoneHistory', "stats.php?entity=zone&breakdown=history&affiliateid={affiliateid}&zoneid={zoneid}", false, "statistics/zoneHistory"));
$oMenu->addTo("2.4.2.1", new OA_Admin_Menu_Section("2.4.2.1.1", 'DailyStats', "stats.php?entity=zone&breakdown=daily&affiliateid={affiliateid}&zoneid={zoneid}&day={day}", false, "statistics/zoneHistory/daily"));
$oMenu->addTo("2.4.2", new OA_Admin_Menu_Section("2.4.2.2", 'CampaignDistribution', "stats.php?entity=zone&breakdown=campaigns&affiliateid={affiliateid}&zoneid={zoneid}", false, "statistics/campaignDistribution"));
$oMenu->addTo("2.4.2.2", new OA_Admin_Menu_Section("2.4.2.2.1", 'DistributionHistoryCampaign', "stats.php?entity=zone&breakdown=campaign-history&affiliateid={affiliateid}&zoneid={zoneid}&campaignid={campaignid}", true, "statistics/campaignDistribution/history"));
$oMenu->addTo("2.4.2.2.1", new OA_Admin_Menu_Section("2.4.2.2.1.1", 'DailyStats', "stats.php?entity=zone&breakdown=daily&affiliateid={affiliateid}&zoneid={zoneid}&campaignid={campaignid}&day={day}", false, "statistics/campaignDistribution/history/daily"));
$oMenu->addTo("2.4.2.2", new OA_Admin_Menu_Section("2.4.2.2.2", 'DistributionHistoryBanner', "stats.php?entity=zone&breakdown=banner-history&affiliateid={affiliateid}&zoneid={zoneid}&campaignid={campaignid}&bannerid={bannerid}", true));
$oMenu->addTo("2.4.2.2.2", new OA_Admin_Menu_Section("2.4.2.2.2.1", 'DailyStats', "stats.php?entity=zone&breakdown=daily&affiliateid={affiliateid}&zoneid={zoneid}&campaignid={campaignid}&bannerid={bannerid}&day={day}"));
$oMenu->addTo("2.4", new OA_Admin_Menu_Section("2.4.3", 'CampaignDistribution', "stats.php?entity=affiliate&breakdown=campaigns&affiliateid={affiliateid}", false, "statistics/campaignDistribution"));
$oMenu->addTo("2.4.3", new OA_Admin_Menu_Section("2.4.3.1", 'DistributionHistoryCampaign', "stats.php?entity=affiliate&breakdown=campaign-history&affiliateid={affiliateid}&campaignid={campaignid}", true, "statistics/campaignDistribution/history"));
$oMenu->addTo("2.4.3.1", new OA_Admin_Menu_Section("2.4.3.1.1", 'DailyStats', "stats.php?entity=affiliate&breakdown=daily&affiliateid={affiliateid}&campaignid={campaignid}&day={day}", false, "statistics/campaignDistribution/history/daily"));
$oMenu->addTo("2.4.3", new OA_Admin_Menu_Section("2.4.3.2", 'DistributionHistoryBanner', "stats.php?entity=affiliate&breakdown=banner-history&affiliateid={affiliateid}&campaignid={campaignid}&bannerid={bannerid}", true));
$oMenu->addTo("2.4.3.2", new OA_Admin_Menu_Section("2.4.3.2.1", 'DailyStats', "stats.php?entity=affiliate&breakdown=daily&affiliateid={affiliateid}&campaignid={campaignid}&bannerid={bannerid}&day={day}"));
$oMenu->add(new OA_Admin_Menu_Section("2", 'Stats', "stats.php?entity=global&breakdown=history", false, "statistics"));
$oMenu->addTo("2", new OA_Admin_Menu_Section("2.2", 'GlobalHistory', "stats.php?entity=global&breakdown=history", false, "statistics/global"));
$oMenu->addTo("2.2", new OA_Admin_Menu_Section("2.2.1", 'DailyStats', "stats.php?entity=global&breakdown=daily&day={day}", false, "statistics/global/daily"));
$oMenu->addTo("2", new OA_Admin_Menu_Section("report-index", 'AdvancedReports', "report-index.php", false, "statistics"));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public function start()
$publisherId = $this->_getId('publisher');

// Security check
OA_Permission::enforceAccount(OA_ACCOUNT_ADMIN, OA_ACCOUNT_MANAGER, OA_ACCOUNT_ADVERTISER);
OA_Permission::enforceAccount(OA_ACCOUNT_MANAGER, OA_ACCOUNT_ADVERTISER);
$this->_checkAccess(['advertiser' => $advertiserId]);

// Cross-entity security check
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public function start()
$advertiserId = $this->_getId('advertiser');

// Security check
OA_Permission::enforceAccount(OA_ACCOUNT_ADMIN, OA_ACCOUNT_MANAGER, OA_ACCOUNT_ADVERTISER);
OA_Permission::enforceAccount(OA_ACCOUNT_MANAGER, OA_ACCOUNT_ADVERTISER);
$this->_checkAccess(['advertiser' => $advertiserId]);

// Add standard page parameters
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public function start()
$advertiserId = $this->_getId('advertiser');

// Security check
OA_Permission::enforceAccount(OA_ACCOUNT_ADMIN, OA_ACCOUNT_MANAGER, OA_ACCOUNT_ADVERTISER);
OA_Permission::enforceAccount(OA_ACCOUNT_MANAGER, OA_ACCOUNT_ADVERTISER);
$this->_checkAccess(['advertiser' => $advertiserId]);

// Add standard page parameters
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public function start()
$zoneId = $this->_getId('zone');

// Security check
OA_Permission::enforceAccount(OA_ACCOUNT_ADMIN, OA_ACCOUNT_MANAGER, OA_ACCOUNT_ADVERTISER);
OA_Permission::enforceAccount(OA_ACCOUNT_MANAGER, OA_ACCOUNT_ADVERTISER);
$this->_checkAccess(['advertiser' => $advertiserId]);

// Cross-entity security check
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public function start()
$advertiserId = $this->_getId('advertiser');

// Security check
OA_Permission::enforceAccount(OA_ACCOUNT_ADMIN, OA_ACCOUNT_MANAGER, OA_ACCOUNT_ADVERTISER);
OA_Permission::enforceAccount(OA_ACCOUNT_MANAGER, OA_ACCOUNT_ADVERTISER);
$this->_checkAccess(['advertiser' => $advertiserId]);

// Add standard page parameters
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public function start()
$zoneId = $this->_getId('zone');

// Security check
OA_Permission::enforceAccount(OA_ACCOUNT_ADMIN, OA_ACCOUNT_MANAGER, OA_ACCOUNT_ADVERTISER);
OA_Permission::enforceAccount(OA_ACCOUNT_MANAGER, OA_ACCOUNT_ADVERTISER);
$this->_checkAccess(['advertiser' => $advertiserId]);

// Fetch campaigns
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public function start()
$adId = $this->_getId('ad', 0);

// Security check
OA_Permission::enforceAccount(OA_ACCOUNT_ADMIN, OA_ACCOUNT_MANAGER, OA_ACCOUNT_TRAFFICKER);
OA_Permission::enforceAccount(OA_ACCOUNT_MANAGER, OA_ACCOUNT_TRAFFICKER);
$this->_checkAccess(['publisher' => $publisherId]);

// Fetch banners
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public function start()
$placementId = $this->_getId('placement', 0);

// Security check
OA_Permission::enforceAccount(OA_ACCOUNT_ADMIN, OA_ACCOUNT_MANAGER, OA_ACCOUNT_TRAFFICKER);
OA_Permission::enforceAccount(OA_ACCOUNT_MANAGER, OA_ACCOUNT_TRAFFICKER);
$this->_checkAccess(['publisher' => $publisherId]);

// Fetch campaigns
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public function start()
$publisherId = $this->_getId('publisher');

// Security check
OA_Permission::enforceAccount(OA_ACCOUNT_ADMIN, OA_ACCOUNT_MANAGER, OA_ACCOUNT_TRAFFICKER);
OA_Permission::enforceAccount(OA_ACCOUNT_MANAGER, OA_ACCOUNT_TRAFFICKER);
$this->_checkAccess(['publisher' => $publisherId]);

// Add standard page parameters
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public function start()
$adId = $this->_getId('ad');

// Security check
OA_Permission::enforceAccount(OA_ACCOUNT_ADMIN, OA_ACCOUNT_MANAGER, OA_ACCOUNT_TRAFFICKER);
OA_Permission::enforceAccount(OA_ACCOUNT_MANAGER, OA_ACCOUNT_TRAFFICKER);
$this->_checkAccess(['publisher' => $publisherId]);

// Cross-entity security check
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public function start()
$publisherId = $this->_getId('publisher');

// Security check
OA_Permission::enforceAccount(OA_ACCOUNT_ADMIN, OA_ACCOUNT_MANAGER, OA_ACCOUNT_TRAFFICKER);
OA_Permission::enforceAccount(OA_ACCOUNT_MANAGER, OA_ACCOUNT_TRAFFICKER);
$this->_checkAccess(['publisher' => $publisherId]);

// Add standard page parameters
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public function start()
$publisherId = $this->_getId('publisher');

// Security check
OA_Permission::enforceAccount(OA_ACCOUNT_ADMIN, OA_ACCOUNT_MANAGER, OA_ACCOUNT_TRAFFICKER);
OA_Permission::enforceAccount(OA_ACCOUNT_MANAGER, OA_ACCOUNT_TRAFFICKER);
$this->_checkAccess(['publisher' => $publisherId]);

// Add standard page parameters
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public function start()
$adId = $this->_getId('ad');

// Security check
OA_Permission::enforceAccount(OA_ACCOUNT_ADMIN, OA_ACCOUNT_MANAGER, OA_ACCOUNT_ADVERTISER);
OA_Permission::enforceAccount(OA_ACCOUNT_MANAGER, OA_ACCOUNT_ADVERTISER);
$this->_checkAccess(['advertiser' => $advertiserId, 'placement' => $placementId, 'ad' => $adId]);

// Fetch campaigns
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public function start()
$adId = $this->_getId('ad');

// Security check
OA_Permission::enforceAccount(OA_ACCOUNT_ADMIN, OA_ACCOUNT_MANAGER, OA_ACCOUNT_ADVERTISER);
OA_Permission::enforceAccount(OA_ACCOUNT_MANAGER, OA_ACCOUNT_ADVERTISER);
$this->_checkAccess(['advertiser' => $advertiserId, 'placement' => $placementId, 'ad' => $adId]);

// Add standard page parameters
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public function start()
$zoneId = $this->_getId('zone');

// Security check
OA_Permission::enforceAccount(OA_ACCOUNT_ADMIN, OA_ACCOUNT_MANAGER, OA_ACCOUNT_ADVERTISER);
OA_Permission::enforceAccount(OA_ACCOUNT_MANAGER, OA_ACCOUNT_ADVERTISER);
$this->_checkAccess(['advertiser' => $advertiserId, 'placement' => $placementId, 'ad' => $adId]);

// Cross-entity security check
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public function start()
$adId = $this->_getId('ad');

// Security check
OA_Permission::enforceAccount(OA_ACCOUNT_ADMIN, OA_ACCOUNT_MANAGER, OA_ACCOUNT_ADVERTISER);
OA_Permission::enforceAccount(OA_ACCOUNT_MANAGER, OA_ACCOUNT_ADVERTISER);
$this->_checkAccess(['advertiser' => $advertiserId, 'placement' => $placementId, 'ad' => $adId]);

// Add standard page parameters
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public function start()
$zoneId = $this->_getId('zone');

// Security check
OA_Permission::enforceAccount(OA_ACCOUNT_ADMIN, OA_ACCOUNT_MANAGER, OA_ACCOUNT_ADVERTISER);
OA_Permission::enforceAccount(OA_ACCOUNT_MANAGER, OA_ACCOUNT_ADVERTISER);
$this->_checkAccess(['advertiser' => $advertiserId, 'placement' => $placementId, 'ad' => $adId]);

// Cross-entity security check
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public function start()
$publisherId = $this->_getId('publisher');

// Security check
OA_Permission::enforceAccount(OA_ACCOUNT_ADMIN, OA_ACCOUNT_MANAGER, OA_ACCOUNT_ADVERTISER);
OA_Permission::enforceAccount(OA_ACCOUNT_MANAGER, OA_ACCOUNT_ADVERTISER);
$this->_checkAccess(['advertiser' => $advertiserId, 'placement' => $placementId]);

// Cross-entity security check
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public function start()
$placementId = $this->_getId('placement');

// Security check
OA_Permission::enforceAccount(OA_ACCOUNT_ADMIN, OA_ACCOUNT_MANAGER, OA_ACCOUNT_ADVERTISER);
OA_Permission::enforceAccount(OA_ACCOUNT_MANAGER, OA_ACCOUNT_ADVERTISER);
$this->_checkAccess(['advertiser' => $advertiserId, 'placement' => $placementId]);

// Add standard page parameters
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public function start()
$placementId = $this->_getId('placement');

// Security check
OA_Permission::enforceAccount(OA_ACCOUNT_ADMIN, OA_ACCOUNT_MANAGER, OA_ACCOUNT_ADVERTISER);
OA_Permission::enforceAccount(OA_ACCOUNT_MANAGER, OA_ACCOUNT_ADVERTISER);
$this->_checkAccess(['advertiser' => $advertiserId, 'placement' => $placementId]);

// Add standard page parameters
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public function start()
$zoneId = $this->_getId('zone');

// Security check
OA_Permission::enforceAccount(OA_ACCOUNT_ADMIN, OA_ACCOUNT_MANAGER, OA_ACCOUNT_ADVERTISER);
OA_Permission::enforceAccount(OA_ACCOUNT_MANAGER, OA_ACCOUNT_ADVERTISER);
$this->_checkAccess(['advertiser' => $advertiserId, 'placement' => $placementId]);

// Cross-entity security check
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public function start()
$placementId = $this->_getId('placement');

// Security check
OA_Permission::enforceAccount(OA_ACCOUNT_ADMIN, OA_ACCOUNT_MANAGER, OA_ACCOUNT_ADVERTISER);
OA_Permission::enforceAccount(OA_ACCOUNT_MANAGER, OA_ACCOUNT_ADVERTISER);
$this->_checkObjectsExist($advertiserId, $placementId);
$this->_checkAccess(['advertiser' => $advertiserId, 'placement' => $placementId]);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public function start()
$zoneId = $this->_getId('zone');

// Security check
OA_Permission::enforceAccount(OA_ACCOUNT_ADMIN, OA_ACCOUNT_MANAGER, OA_ACCOUNT_ADVERTISER);
OA_Permission::enforceAccount(OA_ACCOUNT_MANAGER, OA_ACCOUNT_ADVERTISER);
$this->_checkAccess(['advertiser' => $advertiserId, 'placement' => $placementId]);

// Fetch campaigns
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public function start()
$aPref = $GLOBALS['_MAX']['PREF'];

// Security check
OA_Permission::enforceAccount(OA_ACCOUNT_ADMIN, OA_ACCOUNT_MANAGER);
OA_Permission::enforceAccount(OA_ACCOUNT_MANAGER);

// HTML Framework
$this->pageId = '2.1';
Expand Down
Loading

0 comments on commit ce77f64

Please sign in to comment.