mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-06-01 20:29:29 +00:00
9a4f5480c4
- 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()
60 lines
1.5 KiB
PHP
60 lines
1.5 KiB
PHP
<?php
|
|
/**
|
|
* FH-Complete
|
|
*
|
|
* @package FHC-Helper
|
|
* @author FHC-Team
|
|
* @copyright Copyright (c) 2016 fhcomplete.org
|
|
* @license GPLv3
|
|
* @link https://fhcomplete.org
|
|
* @since Version 1.0.0
|
|
* @filesource
|
|
*/
|
|
if (! defined('FCPATH'))
|
|
exit('No direct script access allowed');
|
|
|
|
require_once(FCPATH.'include/basis_db.class.php');
|
|
require_once(FCPATH.'include/organisationseinheit.class.php');
|
|
require_once(FCPATH.'include/studiengang.class.php');
|
|
require_once(FCPATH.'include/fachbereich.class.php');
|
|
require_once(FCPATH.'include/functions.inc.php');
|
|
require_once(FCPATH.'include/wawi_kostenstelle.class.php');
|
|
require_once(FCPATH.'include/benutzerberechtigung.class.php');
|
|
|
|
/**
|
|
* FHC-Auth Helpers
|
|
*
|
|
* @package FH-Complete
|
|
* @subpackage Libraries
|
|
* @category Library
|
|
* @author FHC-Team
|
|
* @link http://fhcomplete.org/user_guide/helpers/fhcauth_helper.html
|
|
*/
|
|
|
|
// ------------------------------------------------------------------------
|
|
|
|
class FHC_DB_ACL
|
|
{
|
|
protected $bb;
|
|
|
|
/**
|
|
* Auth Username, Password over FH-Complete
|
|
*
|
|
* @param string $username
|
|
* @param string $password
|
|
* @return bool
|
|
*/
|
|
function __construct()
|
|
{
|
|
$this->CI =& get_instance();
|
|
$this->CI->load->helper('fhcauth');
|
|
|
|
$this->bb = new benutzerberechtigung();
|
|
}
|
|
|
|
function isBerechtigt($berechtigung_kurzbz, $art = null, $oe_kurzbz = null, $kostenstelle_id = null)
|
|
{
|
|
$this->bb->getBerechtigungen(getAuthUID());
|
|
return $this->bb->isBerechtigt($berechtigung_kurzbz, $oe_kurzbz, $art, $kostenstelle_id);
|
|
}
|
|
} |