dont load any studiengang related infos for mitarbeiter

This commit is contained in:
Johann Hoffmann
2025-02-12 14:04:23 +01:00
parent a9e3a85d99
commit 60e12e1ab7
3 changed files with 8 additions and 11 deletions
@@ -31,6 +31,7 @@ class Studgang extends FHCAPI_Controller
]);
$this->load->model('organisation/Studiengang_model', 'StudiengangModel');
$this->load->model('ressource/mitarbeiter_model', 'MitarbeiterModel');
// Loads phrases system
$this->loadPhrases([
@@ -43,7 +44,12 @@ class Studgang extends FHCAPI_Controller
// Public methods
public function getStudiengangInfo(){
// fetches the Studiengang Information which is used next the the news
$isMitarbeiter = $this->MitarbeiterModel->isMitarbeiter(getAuthUID());
if($isMitarbeiter) {
$this->terminateWithSuccess();
}
// fetches the Studiengang Information which is used next to the news
$studiengangInfo = $this->StudiengangModel->getStudiengangInfoForNews();
$studiengangInfo= $this->getDataOrTerminateWithError($studiengangInfo);
$this->terminateWithSuccess($studiengangInfo);
@@ -656,6 +656,7 @@ class Studiengang_model extends DB_Model
$this->load->model('person/Benutzerfunktion_model', 'BenutzerfunktionModel');
$this->load->model('person/Person_model', 'PersonModel');
$this->load->model('crm/Student_model', 'StudentModel');
$addEmailProperty= function(&$benutzerfunktionen){
if(count($benutzerfunktionen) && defined('DOMAIN'))
@@ -691,11 +692,6 @@ class Studiengang_model extends DB_Model
if (isError($student))
return error($student);
if (getData($student)) {
//TODO: if a mitarbeiter requests this site, empty data should be returned
if(count($student) == 0)
{
return new stdClass();
}
$student = current(getData($student));
$studiengang_kz = $student->studiengang_kz;
$semester = $student->semester;
-5
View File
@@ -131,11 +131,6 @@ const app = Vue.createApp({
},
});
router.beforeEach((to,from) => {
console.log('to', to)
console.log('from', from)
})
// kind of a bandaid for bad css on some pages to avoid horizontal scroll
setScrollbarWidth();
app.use(router);