Added method getSTG_isEntitledFor to retrieve STG by entitlement of user

This commit is contained in:
hainberg
2019-08-29 14:07:45 +02:00
parent 16e8bf9606
commit b910f220ac
+20
View File
@@ -254,6 +254,26 @@ class PermissionLib
return !$this->_inLAPersonIdsBlacklist($person_id) && $this->_hasLAPermissions();
}
/**
* Returns the study programs the person is entitled for.
* @param null $berechtigung_kurzbz If given, only study programs are retrieved according to organisational units
* assigned to that permission.
* @return array|bool array of studiengang_kz the person is entitled for. False on error.
*/
public function getSTG_isEntitledFor($berechtigung_kurzbz = null)
{
$studiengang_kz_arr = array();
if (self::$bb->getStgKz($berechtigung_kurzbz))
{
return $studiengang_kz_arr = self::$bb->getStgKz($berechtigung_kurzbz);
}
else
{
return false;
}
}
//------------------------------------------------------------------------------------------------------------------
// Private methods