mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-26 00:54:27 +00:00
- 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:
@@ -35,8 +35,7 @@ require_once(FCPATH.'include/benutzerberechtigung.class.php');
|
||||
|
||||
class FHC_DB_ACL
|
||||
{
|
||||
public $bb;
|
||||
protected $_uid;
|
||||
protected $bb;
|
||||
|
||||
/**
|
||||
* Auth Username, Password over FH-Complete
|
||||
@@ -45,37 +44,17 @@ class FHC_DB_ACL
|
||||
* @param string $password
|
||||
* @return bool
|
||||
*/
|
||||
function __construct($param = null)
|
||||
function __construct()
|
||||
{
|
||||
$this->CI =& get_instance();
|
||||
$this->CI->load->helper('fhcauth');
|
||||
|
||||
$this->bb = new benutzerberechtigung();
|
||||
if (is_array($param) && isset($param['uid']))
|
||||
$this->_uid = $param['uid'];
|
||||
}
|
||||
|
||||
function isBerechtigt($berechtigung_kurzbz, $art=null, $oe_kurzbz=null, $kostenstelle_id=null)
|
||||
function isBerechtigt($berechtigung_kurzbz, $art = null, $oe_kurzbz = null, $kostenstelle_id = null)
|
||||
{
|
||||
$this->bb->getBerechtigungen($this->_uid);
|
||||
return $this->bb->isBerechtigt($berechtigung_kurzbz, $oe_kurzbz=null, $art=null, $kostenstelle_id=null);
|
||||
$this->bb->getBerechtigungen(getAuthUID());
|
||||
return $this->bb->isBerechtigt($berechtigung_kurzbz, $oe_kurzbz, $art, $kostenstelle_id);
|
||||
}
|
||||
|
||||
/** ---------------------------------------------------------------
|
||||
* Set UID
|
||||
*
|
||||
* @param string $uid
|
||||
* @return bool
|
||||
*/
|
||||
public function setUID($uid)
|
||||
{
|
||||
return $this->_uid = $uid;
|
||||
}
|
||||
|
||||
/** ---------------------------------------------------------------
|
||||
* get UID
|
||||
*
|
||||
* @return string or (bool)false
|
||||
*/
|
||||
public function getUID()
|
||||
{
|
||||
return $this->_uid;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user