- AuthLib is loaded only in fhcauth_helper, PermissionLib and REST_Controller

- Removed all the NOT usefull loads of helpers and libraries
- Fixed undefined index in controllers/system/UDF and model system/UDF_model
- APIv1_Controller now loads helper fhcauth
- FHC_Controller now loads ithe fhc and session helpers too
- Added/Fixed comments
- PermissionLib does NOT use anymore the getAuthUID function from the fhcauth helper, now relies on AuthLib directly
- REST_Controller loads directly the AuthLib when is needed
This commit is contained in:
Paolo
2018-06-27 13:12:46 +02:00
parent 2f0048c0c3
commit d04b0450da
19 changed files with 155 additions and 166 deletions
+8 -9
View File
@@ -30,6 +30,7 @@ class PermissionLib
const DELETE_RIGHT = 'd';
const REPLACE_RIGHT = 'ui';
private $_ci; // CI instance
private $acl; // conversion array from a source to a permission
private static $bb; // benutzerberechtigung
@@ -40,22 +41,20 @@ class PermissionLib
public function __construct()
{
// Loads CI instance
$this->ci =& get_instance();
// Loads the library to manage the rights system
//$this->ci->load->library('FHC_DB_ACL');
// Loads the auth helper
$this->ci->load->helper('fhcauth');
$this->_ci =& get_instance();
// Loads the array of resources
$this->acl = $this->ci->config->item('fhc_acl');
$this->acl = $this->_ci->config->item('fhc_acl');
// Loads authentication library
$this->_ci->load->library('AuthLib');
// If it's NOT called from command line
if (!is_cli())
{
// API Caller rights initialization
self::$bb = new benutzerberechtigung();
self::$bb->getBerechtigungen(getAuthUID());
self::$bb->getBerechtigungen($this->_ci->authlib->getUser());
}
}