mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-06-10 00:29:27 +00:00
Fixed: Now checking user by prestudent_id to entitle to read DMS document
Signed-off-by: cris-technikum <hainberg@technikum-wien.at>
This commit is contained in:
@@ -292,11 +292,16 @@ class requestAnrechnung extends Auth_Controller
|
||||
*/
|
||||
private function _checkIfEntitledToReadDMSDoc($dms_id)
|
||||
{
|
||||
if (!$student = getData($this->StudentModel->load(array('student_uid' => $this->_uid)))[0])
|
||||
{
|
||||
show_error('Failed loading Student');
|
||||
}
|
||||
|
||||
$result = $this->AnrechnungModel->loadWhere(array('dms_id' => $dms_id));
|
||||
|
||||
if($result = getData($result)[0])
|
||||
{
|
||||
if ($result->insertvon == $this->_uid)
|
||||
if ($result->prestudent_id == $student->prestudent_id)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user