- Added permission basis/phrase to dump.sql

- The function getAuthUID() present in the helper fhcauth_helper.php
now tries to work always with CI session to get the uid
- REST_controller doesn't need anymore to handle the uid
- FHC_Controller and FHC_Model load fhcauth_helper in their constructor,
so any class that extends them now could call the function getAuthUID()
anywhere in the code
- The controllers don't need anymore to pass the uid to the models or to the
libraries
- Library FHC_DB_ACL load fhcauth_helper in its constructor and uses getAuthID()
This commit is contained in:
paolo
2016-06-24 13:22:27 +02:00
parent 58a6da42ae
commit 9a4f5480c4
231 changed files with 412 additions and 636 deletions
@@ -24,8 +24,6 @@ class Ampel extends APIv1_Controller
parent::__construct();
// Load model AmpelModel
$this->load->model('content/ampel_model', 'AmpelModel');
// Load set the uid of the model to let to check the permissions
$this->AmpelModel->setUID($this->_getUID());
}
/**
@@ -24,8 +24,6 @@ class Content extends APIv1_Controller
parent::__construct();
// Load model ContentModel
$this->load->model('content/content_model', 'ContentModel');
// Load set the uid of the model to let to check the permissions
$this->ContentModel->setUID($this->_getUID());
}
/**
@@ -24,8 +24,6 @@ class Contentchild extends APIv1_Controller
parent::__construct();
// Load model ContentchildModel
$this->load->model('content/contentchild_model', 'ContentchildModel');
// Load set the uid of the model to let to check the permissions
$this->ContentchildModel->setUID($this->_getUID());
}
/**
@@ -24,8 +24,6 @@ class Contentgruppe extends APIv1_Controller
parent::__construct();
// Load model ContentgruppeModel
$this->load->model('content/contentgruppe_model', 'ContentgruppeModel');
// Load set the uid of the model to let to check the permissions
$this->ContentgruppeModel->setUID($this->_getUID());
}
/**
@@ -24,8 +24,6 @@ class Contentlog extends APIv1_Controller
parent::__construct();
// Load model ContentlogModel
$this->load->model('content/contentlog_model', 'ContentlogModel');
// Load set the uid of the model to let to check the permissions
$this->ContentlogModel->setUID($this->_getUID());
}
/**
@@ -24,8 +24,6 @@ class Contentsprache extends APIv1_Controller
parent::__construct();
// Load model ContentspracheModel
$this->load->model('content/contentsprache_model', 'ContentspracheModel');
// Load set the uid of the model to let to check the permissions
$this->ContentspracheModel->setUID($this->_getUID());
}
/**
@@ -26,10 +26,6 @@ class Dms extends APIv1_Controller
$this->load->model('content/Dms_model', 'DmsModel');
$this->load->model('content/DmsVersion_model', 'DmsVersionModel');
$this->load->model('content/DmsFS_model', 'DmsFSModel');
// Set the uid of the model to let to check the permissions
$this->DmsModel->setUID($this->_getUID());
$this->DmsVersionModel->setUID($this->_getUID());
$this->DmsFSModel->setUID($this->_getUID());
}
/**
@@ -24,8 +24,6 @@ class Infoscreen extends APIv1_Controller
parent::__construct();
// Load model InfoscreenModel
$this->load->model('content/infoscreen_model', 'InfoscreenModel');
// Load set the uid of the model to let to check the permissions
$this->InfoscreenModel->setUID($this->_getUID());
}
/**
@@ -24,8 +24,6 @@ class News extends APIv1_Controller
parent::__construct();
// Load model NewsModel
$this->load->model('content/news_model', 'NewsModel');
// Load set the uid of the model to let to check the permissions
$this->NewsModel->setUID($this->_getUID());
}
/**
@@ -24,8 +24,6 @@ class Template extends APIv1_Controller
parent::__construct();
// Load model TemplateModel
$this->load->model('content/template_model', 'TemplateModel');
// Load set the uid of the model to let to check the permissions
$this->TemplateModel->setUID($this->_getUID());
}
/**
@@ -24,8 +24,6 @@ class Veranstaltung extends APIv1_Controller
parent::__construct();
// Load model VeranstaltungModel
$this->load->model('content/veranstaltung_model', 'VeranstaltungModel');
// Load set the uid of the model to let to check the permissions
$this->VeranstaltungModel->setUID($this->_getUID());
}
/**
@@ -24,8 +24,6 @@ class Veranstaltungskategorie extends APIv1_Controller
parent::__construct();
// Load model VeranstaltungskategorieModel
$this->load->model('content/veranstaltungskategorie_model', 'VeranstaltungskategorieModel');
// Load set the uid of the model to let to check the permissions
$this->VeranstaltungskategorieModel->setUID($this->_getUID());
}
/**