mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-24 10:22:18 +00:00
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:
@@ -21,7 +21,7 @@ class Akadgrad extends APIv1_Controller
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
parent::__construct(array('Akadgrad' => 'basis/akadgrad:rw'));
|
||||
// Load model AkadgradModel
|
||||
$this->load->model('codex/akadgrad_model', 'AkadgradModel');
|
||||
}
|
||||
@@ -32,11 +32,11 @@ class Akadgrad extends APIv1_Controller
|
||||
public function getAkadgrad()
|
||||
{
|
||||
$akadgradID = $this->get('akadgrad_id');
|
||||
|
||||
|
||||
if (isset($akadgradID))
|
||||
{
|
||||
$result = $this->AkadgradModel->load($akadgradID);
|
||||
|
||||
|
||||
$this->response($result, REST_Controller::HTTP_OK);
|
||||
}
|
||||
else
|
||||
@@ -60,7 +60,7 @@ class Akadgrad extends APIv1_Controller
|
||||
{
|
||||
$result = $this->AkadgradModel->insert($this->post());
|
||||
}
|
||||
|
||||
|
||||
$this->response($result, REST_Controller::HTTP_OK);
|
||||
}
|
||||
else
|
||||
@@ -68,9 +68,9 @@ class Akadgrad extends APIv1_Controller
|
||||
$this->response();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private function _validate($akadgrad = NULL)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user