Skip to content

Commit

Permalink
Update ReportsController.php
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffreyschmitz87 authored Sep 17, 2019
1 parent 59c9d26 commit 6acb0ab
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/controllers/ReportsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ public function actionResultsIndexTemplate(string $viewContext = DataSources::DE
*/
public function actionEditReportTemplate(string $viewContext = DataSources::DEFAULT_VIEW_CONTEXT, $pluginHandle = 'sprout-reports', string $dataSourceId = null, Report $report = null, int $reportId = null): Response
{
$this->requirePermission($this->permissions['sproutReports-editReports']);
//$this->requirePermission($this->permissions['sproutReports-editReports']);

$reportElement = new Report();
$reportElement->enabled = 1;
Expand Down Expand Up @@ -251,7 +251,7 @@ public function actionEditReportTemplate(string $viewContext = DataSources::DEFA
public function actionUpdateReport()
{
$this->requirePostRequest();
$this->requirePermission($this->permissions['sproutReports-editReports']);
//$this->requirePermission($this->permissions['sproutReports-editReports']);

$request = Craft::$app->getRequest();

Expand Down Expand Up @@ -301,7 +301,7 @@ public function actionUpdateReport()
public function actionSaveReport()
{
$this->requirePostRequest();
$this->requirePermission($this->permissions['sproutReports-editReports']);
//$this->requirePermission($this->permissions['sproutReports-editReports']);

$report = $this->prepareFromPost();

Expand Down Expand Up @@ -333,7 +333,7 @@ public function actionSaveReport()
public function actionDeleteReport(): Response
{
$this->requirePostRequest();
$this->requirePermission($this->permissions['sproutReports-editReports']);
//$this->requirePermission($this->permissions['sproutReports-editReports']);

$reportId = Craft::$app->getRequest()->getBodyParam('id');

Expand All @@ -359,7 +359,7 @@ public function actionDeleteReport(): Response
public function actionSaveGroup(): Response
{
$this->requirePostRequest();
$this->requirePermission($this->permissions['sproutReports-editReports']);
//$this->requirePermission($this->permissions['sproutReports-editReports']);

$request = Craft::$app->getRequest();

Expand Down Expand Up @@ -396,7 +396,7 @@ public function actionSaveGroup(): Response
public function actionDeleteGroup(): Response
{
$this->requirePostRequest();
$this->requirePermission($this->permissions['sproutReports-editReports']);
//$this->requirePermission($this->permissions['sproutReports-editReports']);

$groupId = Craft::$app->getRequest()->getBodyParam('id');
$success = SproutBaseReports::$app->reportGroups->deleteGroup($groupId);
Expand Down

0 comments on commit 6acb0ab

Please sign in to comment.