- Method getCheckBewerbung implemented with new standard

- Added new permission in fhcomplete.php config file
This commit is contained in:
paolo
2016-05-10 13:05:02 +02:00
parent 6d093dc4ed
commit 44ebe15c9c
4 changed files with 65 additions and 68 deletions
@@ -16,6 +16,13 @@ class Studiengang_model extends DB_Model
*/
public function getAllForBewerbung()
{
// Checks if the operation is permitted by the API caller
if (! $this->fhc_db_acl->isBerechtigt($this->acl['lehre.vw_studienplan'], 's'))
return $this->_error(lang('fhc_'.FHC_NORIGHT).' -> '.$this->acl['lehre.vw_studienplan'], FHC_MODEL_ERROR);
if (! $this->fhc_db_acl->isBerechtigt($this->acl['bis.tbl_lgartcode'], 's'))
return $this->_error(lang('fhc_'.FHC_NORIGHT).' -> '.$this->acl['bis.tbl_lgartcode'], FHC_MODEL_ERROR);
$allForBewerbungQuery = "SELECT DISTINCT studiengang_kz,
typ,
organisationseinheittyp_kurzbz,
@@ -29,13 +36,8 @@ class Studiengang_model extends DB_Model
AND aktiv IS TRUE
ORDER BY typ, studiengangbezeichnung, tbl_lgartcode.bezeichnung ASC";
// Checks if the operation is permitted by the API caller
if (! $this->fhc_db_acl->isBerechtigt($this->acl['lehre.vw_studienplan'], 's'))
return $this->_error(lang('fhc_'.FHC_NORIGHT).' -> '.$this->acl['lehre.vw_studienplan'], FHC_MODEL_ERROR);
$result = $this->db->query($allForBewerbungQuery);
if (! $this->fhc_db_acl->isBerechtigt($this->acl['bis.tbl_lgartcode'], 's'))
return $this->_error(lang('fhc_'.FHC_NORIGHT).' -> '.$this->acl['bis.tbl_lgartcode'], FHC_MODEL_ERROR);
return $this->db->query($allForBewerbungQuery);
return $this->_success($result->result());
}
}