Added permissions array to every controller that extends APIv1_Controller

CheckUserAuth and Test controllers now extends directly the REST_Controller
This commit is contained in:
Paolo
2018-03-28 12:09:54 +02:00
parent e4a254a284
commit 1fcc878cb5
221 changed files with 1728 additions and 1624 deletions
@@ -21,11 +21,11 @@ class Pruefling extends APIv1_Controller
*/
public function __construct()
{
parent::__construct();
parent::__construct(array('Pruefling' => 'basis/pruefling:rw'));
// Load model PrueflingModel
$this->load->model('testtool/pruefling_model', 'PrueflingModel');
}
/**
@@ -34,11 +34,11 @@ class Pruefling extends APIv1_Controller
public function getPruefling()
{
$prueflingID = $this->get('pruefling_id');
if (isset($prueflingID))
{
$result = $this->PrueflingModel->load($prueflingID);
$this->response($result, REST_Controller::HTTP_OK);
}
else
@@ -62,7 +62,7 @@ class Pruefling extends APIv1_Controller
{
$result = $this->PrueflingModel->insert($this->post());
}
$this->response($result, REST_Controller::HTTP_OK);
}
else
@@ -70,9 +70,9 @@ class Pruefling extends APIv1_Controller
$this->response();
}
}
private function _validate($pruefling = NULL)
{
return true;
}
}
}