replace dependencies on legacy code with ci model functions

This commit is contained in:
Harald Bamberger
2024-11-07 19:18:08 +01:00
parent f4176b86ee
commit 1691c75a84
9 changed files with 524 additions and 412 deletions
+27
View File
@@ -95,6 +95,33 @@ class PermissionLib
return $isBerechtigt;
}
/**
* Prueft ob die Berechtigung zumindest fuer eine der angegebenen OE vorhanden ist.
* @param $berechtigung_kurzbz
* @param $oe_kurzbz
* @param $art
* @param $kostenstelle_id
* @return boolean
*/
public function isBerechtigtMultipleOe($berechtigung_kurzbz, $oe_kurzbz, $art=null, $kostenstelle_id=null)
{
$results = array();
foreach($oe_kurzbz as $value)
{
$results[] = $this->isBerechtigt($berechtigung_kurzbz, $value, $art, $kostenstelle_id);
}
if(!in_array(true, $results))
{
return false;
}
else
{
return true;
}
}
/**
* Checks if the caller is allowed to access to this content with the given permissions
* - if it's called from command line than it's trusted