Skip to content
This repository has been archived by the owner on Sep 8, 2022. It is now read-only.

Fixing few more ACL problems #14

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
133 changes: 0 additions & 133 deletions Controller/Adminhtml/AbstractMassAction.php

This file was deleted.

8 changes: 8 additions & 0 deletions Controller/Adminhtml/Post/MassDelete.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,12 @@ public function execute()
$resultRedirect = $this->resultFactory->create(ResultFactory::TYPE_REDIRECT);
return $resultRedirect->setPath('*/*/');
}

/**
* {@inheritdoc}
*/
protected function _isAllowed()
{
return $this->_authorization->isAllowed('Ashsmith_Blog::post_delete');
}
}
7 changes: 7 additions & 0 deletions Controller/Adminhtml/Post/MassDisable.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,13 @@ class MassDisable extends \Magento\Backend\App\Action
*/
protected $collectionFactory;

/**
* {@inheritdoc}
*/
protected function _isAllowed()
{
return $this->_authorization->isAllowed('Ashsmith_Blog::post');
}

/**
* @param Context $context
Expand Down
7 changes: 7 additions & 0 deletions Controller/Adminhtml/Post/MassEnable.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,13 @@ class MassEnable extends \Magento\Backend\App\Action
*/
protected $collectionFactory;

/**
* {@inheritdoc}
*/
protected function _isAllowed()
{
return $this->_authorization->isAllowed('Ashsmith_Blog::post');
}

/**
* @param Context $context
Expand Down