mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-23 09:52:22 +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 Entwicklungsteam extends APIv1_Controller
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
parent::__construct(array('Entwicklungsteam' => 'basis/entwicklungsteam:rw'));
|
||||
// Load model EntwicklungsteamModel
|
||||
$this->load->model('codex/entwicklungsteam_model', 'EntwicklungsteamModel');
|
||||
}
|
||||
@@ -33,11 +33,11 @@ class Entwicklungsteam extends APIv1_Controller
|
||||
{
|
||||
$studiengang_kz = $this->get('studiengang_kz');
|
||||
$mitarbeiter_uid = $this->get('mitarbeiter_uid');
|
||||
|
||||
|
||||
if (isset($studiengang_kz) && isset($mitarbeiter_uid))
|
||||
{
|
||||
$result = $this->EntwicklungsteamModel->load(array($studiengang_kz, $mitarbeiter_uid));
|
||||
|
||||
|
||||
$this->response($result, REST_Controller::HTTP_OK);
|
||||
}
|
||||
else
|
||||
@@ -61,7 +61,7 @@ class Entwicklungsteam extends APIv1_Controller
|
||||
{
|
||||
$result = $this->EntwicklungsteamModel->insert($this->post());
|
||||
}
|
||||
|
||||
|
||||
$this->response($result, REST_Controller::HTTP_OK);
|
||||
}
|
||||
else
|
||||
@@ -69,9 +69,9 @@ class Entwicklungsteam extends APIv1_Controller
|
||||
$this->response();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private function _validate($entwicklungsteam = NULL)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user