Acl refactoring
This commit is contained in:
@@ -17,7 +17,7 @@ class Action extends Base
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
$project = $this->getProjectManagement();
|
||||
$project = $this->getProject();
|
||||
|
||||
$this->response->html($this->projectLayout('action/index', array(
|
||||
'values' => array('project_id' => $project['id']),
|
||||
@@ -42,7 +42,7 @@ class Action extends Base
|
||||
*/
|
||||
public function event()
|
||||
{
|
||||
$project = $this->getProjectManagement();
|
||||
$project = $this->getProject();
|
||||
$values = $this->request->getValues();
|
||||
|
||||
if (empty($values['action_name']) || empty($values['project_id'])) {
|
||||
@@ -64,7 +64,7 @@ class Action extends Base
|
||||
*/
|
||||
public function params()
|
||||
{
|
||||
$project = $this->getProjectManagement();
|
||||
$project = $this->getProject();
|
||||
$values = $this->request->getValues();
|
||||
|
||||
if (empty($values['action_name']) || empty($values['project_id']) || empty($values['event_name'])) {
|
||||
@@ -101,7 +101,7 @@ class Action extends Base
|
||||
*/
|
||||
public function create()
|
||||
{
|
||||
$this->doCreation($this->getProjectManagement(), $this->request->getValues());
|
||||
$this->doCreation($this->getProject(), $this->request->getValues());
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -135,7 +135,7 @@ class Action extends Base
|
||||
*/
|
||||
public function confirm()
|
||||
{
|
||||
$project = $this->getProjectManagement();
|
||||
$project = $this->getProject();
|
||||
|
||||
$this->response->html($this->projectLayout('action/remove', array(
|
||||
'action' => $this->action->getById($this->request->getIntegerParam('action_id')),
|
||||
@@ -154,7 +154,7 @@ class Action extends Base
|
||||
public function remove()
|
||||
{
|
||||
$this->checkCSRFParam();
|
||||
$project = $this->getProjectManagement();
|
||||
$project = $this->getProject();
|
||||
$action = $this->action->getById($this->request->getIntegerParam('action_id'));
|
||||
|
||||
if ($action && $this->action->remove($action['id'])) {
|
||||
|
||||
Reference in New Issue
Block a user