mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-25 08:34:29 +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,11 +21,11 @@ class Ablauf extends APIv1_Controller
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
parent::__construct(array('Ablauf' => 'basis/ablauf:rw'));
|
||||
// Load model AblaufModel
|
||||
$this->load->model('testtool/ablauf_model', 'AblaufModel');
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -34,11 +34,11 @@ class Ablauf extends APIv1_Controller
|
||||
public function getAblauf()
|
||||
{
|
||||
$ablaufID = $this->get('ablauf_id');
|
||||
|
||||
|
||||
if (isset($ablaufID))
|
||||
{
|
||||
$result = $this->AblaufModel->load($ablaufID);
|
||||
|
||||
|
||||
$this->response($result, REST_Controller::HTTP_OK);
|
||||
}
|
||||
else
|
||||
@@ -62,7 +62,7 @@ class Ablauf extends APIv1_Controller
|
||||
{
|
||||
$result = $this->AblaufModel->insert($this->post());
|
||||
}
|
||||
|
||||
|
||||
$this->response($result, REST_Controller::HTTP_OK);
|
||||
}
|
||||
else
|
||||
@@ -70,9 +70,9 @@ class Ablauf extends APIv1_Controller
|
||||
$this->response();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private function _validate($ablauf = NULL)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,11 +21,11 @@ class Antwort extends APIv1_Controller
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
parent::__construct(array('Antwort' => 'basis/antwort:rw'));
|
||||
// Load model AntwortModel
|
||||
$this->load->model('testtool/antwort_model', 'AntwortModel');
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -34,11 +34,11 @@ class Antwort extends APIv1_Controller
|
||||
public function getAntwort()
|
||||
{
|
||||
$antwortID = $this->get('antwort_id');
|
||||
|
||||
|
||||
if (isset($antwortID))
|
||||
{
|
||||
$result = $this->AntwortModel->load($antwortID);
|
||||
|
||||
|
||||
$this->response($result, REST_Controller::HTTP_OK);
|
||||
}
|
||||
else
|
||||
@@ -62,7 +62,7 @@ class Antwort extends APIv1_Controller
|
||||
{
|
||||
$result = $this->AntwortModel->insert($this->post());
|
||||
}
|
||||
|
||||
|
||||
$this->response($result, REST_Controller::HTTP_OK);
|
||||
}
|
||||
else
|
||||
@@ -70,9 +70,9 @@ class Antwort extends APIv1_Controller
|
||||
$this->response();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private function _validate($antwort = NULL)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,11 +21,11 @@ class Frage extends APIv1_Controller
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
parent::__construct(array('Frage' => 'basis/frage:rw'));
|
||||
// Load model FrageModel
|
||||
$this->load->model('testtool/frage_model', 'FrageModel');
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -34,11 +34,11 @@ class Frage extends APIv1_Controller
|
||||
public function getFrage()
|
||||
{
|
||||
$frageID = $this->get('frage_id');
|
||||
|
||||
|
||||
if (isset($frageID))
|
||||
{
|
||||
$result = $this->FrageModel->load($frageID);
|
||||
|
||||
|
||||
$this->response($result, REST_Controller::HTTP_OK);
|
||||
}
|
||||
else
|
||||
@@ -62,7 +62,7 @@ class Frage extends APIv1_Controller
|
||||
{
|
||||
$result = $this->FrageModel->insert($this->post());
|
||||
}
|
||||
|
||||
|
||||
$this->response($result, REST_Controller::HTTP_OK);
|
||||
}
|
||||
else
|
||||
@@ -70,9 +70,9 @@ class Frage extends APIv1_Controller
|
||||
$this->response();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private function _validate($frage = NULL)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,11 +21,11 @@ class Gebiet extends APIv1_Controller
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
parent::__construct(array('Gebiet' => 'basis/gebiet:rw'));
|
||||
// Load model GebietModel
|
||||
$this->load->model('testtool/gebiet_model', 'GebietModel');
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -34,11 +34,11 @@ class Gebiet extends APIv1_Controller
|
||||
public function getGebiet()
|
||||
{
|
||||
$gebietID = $this->get('gebiet_id');
|
||||
|
||||
|
||||
if (isset($gebietID))
|
||||
{
|
||||
$result = $this->GebietModel->load($gebietID);
|
||||
|
||||
|
||||
$this->response($result, REST_Controller::HTTP_OK);
|
||||
}
|
||||
else
|
||||
@@ -62,7 +62,7 @@ class Gebiet extends APIv1_Controller
|
||||
{
|
||||
$result = $this->GebietModel->insert($this->post());
|
||||
}
|
||||
|
||||
|
||||
$this->response($result, REST_Controller::HTTP_OK);
|
||||
}
|
||||
else
|
||||
@@ -70,9 +70,9 @@ class Gebiet extends APIv1_Controller
|
||||
$this->response();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private function _validate($gebiet = NULL)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,11 +21,11 @@ class Kategorie extends APIv1_Controller
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
parent::__construct(array('Kategorie' => 'basis/kategorie:rw'));
|
||||
// Load model KategorieModel
|
||||
$this->load->model('testtool/kategorie_model', 'KategorieModel');
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -34,11 +34,11 @@ class Kategorie extends APIv1_Controller
|
||||
public function getKategorie()
|
||||
{
|
||||
$kategorie_kurzbz = $this->get('kategorie_kurzbz');
|
||||
|
||||
|
||||
if (isset($kategorie_kurzbz))
|
||||
{
|
||||
$result = $this->KategorieModel->load($kategorie_kurzbz);
|
||||
|
||||
|
||||
$this->response($result, REST_Controller::HTTP_OK);
|
||||
}
|
||||
else
|
||||
@@ -62,7 +62,7 @@ class Kategorie extends APIv1_Controller
|
||||
{
|
||||
$result = $this->KategorieModel->insert($this->post());
|
||||
}
|
||||
|
||||
|
||||
$this->response($result, REST_Controller::HTTP_OK);
|
||||
}
|
||||
else
|
||||
@@ -70,9 +70,9 @@ class Kategorie extends APIv1_Controller
|
||||
$this->response();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private function _validate($kategorie = NULL)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,11 +21,11 @@ class Kriterien extends APIv1_Controller
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
parent::__construct(array('Kriterien' => 'basis/kriterien:rw'));
|
||||
// Load model KriterienModel
|
||||
$this->load->model('testtool/kriterien_model', 'KriterienModel');
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -34,11 +34,11 @@ class Kriterien extends APIv1_Controller
|
||||
public function getKriterien()
|
||||
{
|
||||
$kriterienID = $this->get('kriterien_id');
|
||||
|
||||
|
||||
if (isset($kriterienID))
|
||||
{
|
||||
$result = $this->KriterienModel->load($kriterienID);
|
||||
|
||||
|
||||
$this->response($result, REST_Controller::HTTP_OK);
|
||||
}
|
||||
else
|
||||
@@ -62,7 +62,7 @@ class Kriterien extends APIv1_Controller
|
||||
{
|
||||
$result = $this->KriterienModel->insert($this->post());
|
||||
}
|
||||
|
||||
|
||||
$this->response($result, REST_Controller::HTTP_OK);
|
||||
}
|
||||
else
|
||||
@@ -70,9 +70,9 @@ class Kriterien extends APIv1_Controller
|
||||
$this->response();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private function _validate($kriterien = NULL)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,11 +21,11 @@ class Vorschlag extends APIv1_Controller
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
parent::__construct(array('Vorschlag' => 'basis/vorschlag:rw'));
|
||||
// Load model VorschlagModel
|
||||
$this->load->model('testtool/vorschlag_model', 'VorschlagModel');
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -34,11 +34,11 @@ class Vorschlag extends APIv1_Controller
|
||||
public function getVorschlag()
|
||||
{
|
||||
$vorschlagID = $this->get('vorschlag_id');
|
||||
|
||||
|
||||
if (isset($vorschlagID))
|
||||
{
|
||||
$result = $this->VorschlagModel->load($vorschlagID);
|
||||
|
||||
|
||||
$this->response($result, REST_Controller::HTTP_OK);
|
||||
}
|
||||
else
|
||||
@@ -62,7 +62,7 @@ class Vorschlag extends APIv1_Controller
|
||||
{
|
||||
$result = $this->VorschlagModel->insert($this->post());
|
||||
}
|
||||
|
||||
|
||||
$this->response($result, REST_Controller::HTTP_OK);
|
||||
}
|
||||
else
|
||||
@@ -70,9 +70,9 @@ class Vorschlag extends APIv1_Controller
|
||||
$this->response();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private function _validate($vorschlag = NULL)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user