mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-20 00:12:15 +00:00
- 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:
@@ -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());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user