diff --git a/application/controllers/Cis/Documents.php b/application/controllers/Cis/Documents.php index 31f441634..6e007c1f9 100644 --- a/application/controllers/Cis/Documents.php +++ b/application/controllers/Cis/Documents.php @@ -15,9 +15,9 @@ class Documents extends Auth_Controller public function __construct() { parent::__construct([ - 'index' => ['student/anrechnung_beantragen:r','user:r'], // TODO(chris): permissions? + 'index' => [self::PERM_LOGGED], 'student' => ['admin:r'], - 'download' => ['student/anrechnung_beantragen:r','user:r'] // TODO(chris): permissions? + 'download' => [self::PERM_LOGGED] ]); $this->load->model('crm/Prestudentstatus_model', 'PrestudentstatusModel'); diff --git a/application/controllers/Cis/MyLv.php b/application/controllers/Cis/MyLv.php index 9514d5b6b..08bf843b5 100644 --- a/application/controllers/Cis/MyLv.php +++ b/application/controllers/Cis/MyLv.php @@ -13,8 +13,8 @@ class MyLv extends Auth_Controller public function __construct() { parent::__construct([ - 'index' => ['student/anrechnung_beantragen:r','user:r'], // TODO(chris): permissions? - 'Info' => ['student/anrechnung_beantragen:r','user:r'] // TODO(chris): permissions? + 'index' => ['basis/cis:r'], + 'Info' => [self::PERM_LOGGED] ]); } diff --git a/application/controllers/Cis/Profil.php b/application/controllers/Cis/Profil.php index 1141808fe..e991d1976 100644 --- a/application/controllers/Cis/Profil.php +++ b/application/controllers/Cis/Profil.php @@ -13,16 +13,16 @@ class Profil extends Auth_Controller public function __construct() { parent::__construct([ - 'index' => ['student/anrechnung_beantragen:r', 'user:r'], - 'foto_sperre_function' => ['student/anrechnung_beantragen:r', 'user:r'], - 'getView' => ['student/anrechnung_beantragen:r', 'user:r'], - 'View' => ['student/anrechnung_beantragen:r', 'user:r'], - 'isMitarbeiter' => ['student/anrechnung_beantragen:r', 'user:r'], - 'isStudent' => ['student/anrechnung_beantragen:r', 'user:r'], - 'getZustellAdresse' => ['student/anrechnung_beantragen:r', 'user:r'], - 'getZustellKontakt' => ['student/anrechnung_beantragen:r', 'user:r'], - 'getAllNationen' => ['student/anrechnung_beantragen:r', 'user:r'], - 'getGemeinden' => ['student/anrechnung_beantragen:r', 'user:r'], + 'index' => ['basis/cis:r'], + 'foto_sperre_function' => ['basis/cis:r'], + 'getView' => ['basis/cis:r'], + 'View' => ['basis/cis:r'], + 'isMitarbeiter' => ['basis/cis:r'], + 'isStudent' => ['basis/cis:r'], + 'getZustellAdresse' => ['basis/cis:r'], + 'getZustellKontakt' => ['basis/cis:r'], + 'getAllNationen' => ['basis/cis:r'], + 'getGemeinden' => ['basis/cis:r'], ]); diff --git a/application/controllers/Cis/ProfilUpdate.php b/application/controllers/Cis/ProfilUpdate.php index ef767a625..423b0c9c3 100644 --- a/application/controllers/Cis/ProfilUpdate.php +++ b/application/controllers/Cis/ProfilUpdate.php @@ -24,16 +24,16 @@ class ProfilUpdate extends Auth_Controller 'getProfilUpdateWithPermission' => ['student/stammdaten:r', 'mitarbeiter/stammdaten:r'], 'acceptProfilRequest' => ['student/stammdaten:rw', 'mitarbeiter/stammdaten:rw'], 'denyProfilRequest' => ['student/stammdaten:rw', 'mitarbeiter/stammdaten:rw'], - 'show' => ['student/anrechnung_beantragen:r', 'user:r'], + 'show' => ['basis/cis:r'], - 'insertProfilRequest' => ['student/anrechnung_beantragen:r', 'user:r'], - 'updateProfilRequest' => ['student/anrechnung_beantragen:r', 'user:r'], - 'deleteProfilRequest' => ['student/anrechnung_beantragen:r', 'user:r'], - 'selectProfilRequest' => ['student/anrechnung_beantragen:r', 'user:r'], - 'insertFile' => ['student/anrechnung_beantragen:r', 'user:r'], - 'getProfilRequestFiles' => ['student/anrechnung_beantragen:r', 'user:r'], - 'getStatus' => ['student/anrechnung_beantragen:r', 'user:r'], - 'getTopic' => ['student/anrechnung_beantragen:r', 'user:r'], + 'insertProfilRequest' => ['basis/cis:rw'], + 'updateProfilRequest' => ['basis/cis:rw'], + 'deleteProfilRequest' => ['basis/cis:rw'], + 'selectProfilRequest' => ['basis/cis:r'], + 'insertFile' => ['basis/cis:rw'], + 'getProfilRequestFiles' => ['basis/cis:r'], + 'getStatus' => ['basis/cis:r'], + 'getTopic' => ['basis/cis:r'], ]); diff --git a/application/controllers/Cis/Pub.php b/application/controllers/Cis/Pub.php index 099d093f7..bebc844ab 100644 --- a/application/controllers/Cis/Pub.php +++ b/application/controllers/Cis/Pub.php @@ -5,18 +5,18 @@ if (! defined('BASEPATH')) exit('No direct script access allowed'); /** * */ -class Pub extends FHC_Controller +class Pub extends Auth_Controller { /** * Constructor */ public function __construct() { - parent::__construct(); - - // Load Libraries - $this->load->library('AuthLib'); - $this->load->library('PermissionLib'); + parent::__construct( + array( + 'bild' => ['basis/cis:r'] + ) + ); } // ----------------------------------------------------------------------------------------------------------------- diff --git a/application/controllers/Cis/Stundenplan.php b/application/controllers/Cis/Stundenplan.php index 80fb2130a..3e4e1a070 100644 --- a/application/controllers/Cis/Stundenplan.php +++ b/application/controllers/Cis/Stundenplan.php @@ -13,7 +13,7 @@ class Stundenplan extends Auth_Controller public function __construct() { parent::__construct([ - 'index' => ['student/anrechnung_beantragen:r','user:r'] // TODO(chris): permissions? + 'index' => ['basis/cis:r'] ]); } diff --git a/application/controllers/Cis4.php b/application/controllers/Cis4.php index 5b3f67403..f82168f83 100644 --- a/application/controllers/Cis4.php +++ b/application/controllers/Cis4.php @@ -5,18 +5,18 @@ if (! defined('BASEPATH')) exit('No direct script access allowed'); /** * */ -class Cis4 extends FHC_Controller +class Cis4 extends Auth_Controller { /** * Constructor */ public function __construct() { - parent::__construct(); - - // Loads Libraries - $this->load->library('AuthLib'); - $this->load->library('PermissionLib'); + parent::__construct( + array( + 'index' => 'basis/cis:r' + ) + ); } // ----------------------------------------------------------------------------------------------------------------- diff --git a/application/controllers/CisHmvc.php b/application/controllers/CisHmvc.php index 640f7f640..ce2664823 100644 --- a/application/controllers/CisHmvc.php +++ b/application/controllers/CisHmvc.php @@ -7,16 +7,18 @@ use \DOMDocument as DOMDocument; /** * */ -class CisHmvc extends FHC_Controller +class CisHmvc extends Auth_Controller { /** * Constructor */ public function __construct() { - parent::__construct(); - $this->load->library('AuthLib'); - $this->load->library('PermissionLib'); + parent::__construct( + array( + 'index' => 'basis/cis:r' + ) + ); $this->load->model('content/Content_model', 'ContentModel'); } @@ -43,7 +45,7 @@ class CisHmvc extends FHC_Controller $path = explode('/', uri_string()); array_shift($path); // NOTE(chris): remove cis4/ - $menu = $this->ContentModel->getMenu(6739, get_uid()); + $menu = $this->ContentModel->getMenu(6739, getAuthUID()); if (isError($menu)) { // TODO(chris): Error Handling return $this->load->view('CisHmvc/Error', ['error' => getError($menu)]); diff --git a/application/controllers/CisHmvc/Dashboard.php b/application/controllers/CisHmvc/Dashboard.php index 2d95fb652..229fc7b85 100644 --- a/application/controllers/CisHmvc/Dashboard.php +++ b/application/controllers/CisHmvc/Dashboard.php @@ -14,7 +14,7 @@ class Dashboard extends Auth_Controller { parent::__construct( array( - 'index' => 'user:r' + 'index' => 'dashboard/benutzer:r' ) ); } diff --git a/application/controllers/CisHtml/Cms.php b/application/controllers/CisHtml/Cms.php index c2feccd59..c128ec81b 100644 --- a/application/controllers/CisHtml/Cms.php +++ b/application/controllers/CisHtml/Cms.php @@ -6,7 +6,7 @@ if (!defined('BASEPATH')) /** * */ -class Cms extends FHC_Controller +class Cms extends Auth_Controller { /** * Constructor @@ -14,11 +14,14 @@ class Cms extends FHC_Controller public function __construct() { - parent::__construct(); + parent::__construct( + array( + 'content' => 'basis/cis:r', + 'news' => 'basis/cis:r', + ) + ); // Loads Libraries - $this->load->library('AuthLib'); - $this->load->library('PermissionLib'); $this->load->library('CmsLib'); // Loads phrases system diff --git a/application/controllers/CisHtml/Dashboard.php b/application/controllers/CisHtml/Dashboard.php index e4d422788..bce24e9b8 100644 --- a/application/controllers/CisHtml/Dashboard.php +++ b/application/controllers/CisHtml/Dashboard.php @@ -14,7 +14,7 @@ class Dashboard extends Auth_Controller { parent::__construct( array( - 'index' => 'user:r' + 'index' => 'dashboard/benutzer:r' ) ); diff --git a/application/controllers/CisVue/Cms.php b/application/controllers/CisVue/Cms.php index d1ab3c23b..d1fe5468e 100644 --- a/application/controllers/CisVue/Cms.php +++ b/application/controllers/CisVue/Cms.php @@ -6,18 +6,24 @@ if (!defined('BASEPATH')) /** * */ -class Cms extends FHC_Controller +class Cms extends Auth_Controller { /** * Constructor */ public function __construct() { - parent::__construct(); + parent::__construct( + array( + 'content' => 'basis/cis:r', + 'getNews' => 'basis/cis:r', + 'getNewsRowCount' => 'basis/cis:r', + 'getRoomInformation' => 'basis/cis:r', + 'news' => 'basis/cis:r' + ) + ); // Loads Libraries - $this->load->library('AuthLib'); - $this->load->library('PermissionLib'); $this->load->library('CmsLib'); // Loads phrases system diff --git a/application/controllers/CisVue/Dashboard.php b/application/controllers/CisVue/Dashboard.php index 94af6531b..5a0996a96 100644 --- a/application/controllers/CisVue/Dashboard.php +++ b/application/controllers/CisVue/Dashboard.php @@ -14,7 +14,7 @@ class Dashboard extends Auth_Controller { parent::__construct( array( - 'index' => 'user:r' + 'index' => 'dashboard/benutzer:r' ) ); } diff --git a/application/controllers/api/frontend/v1/Cms.php b/application/controllers/api/frontend/v1/Cms.php index 51acf5067..16142532b 100644 --- a/application/controllers/api/frontend/v1/Cms.php +++ b/application/controllers/api/frontend/v1/Cms.php @@ -179,6 +179,8 @@ class Cms extends FHCAPI_Controller $news = $this->getDataOrTerminateWithError($news); + $this->addMeta('test', $this->p->t('global', 'studiengangsleitung')); + $this->addMeta('phrases', json_decode($this->p->getJson())); $this->terminateWithSuccess($news); } diff --git a/application/controllers/api/frontend/v1/LvMenu.php b/application/controllers/api/frontend/v1/LvMenu.php index 2a1f08772..f9a8d0568 100644 --- a/application/controllers/api/frontend/v1/LvMenu.php +++ b/application/controllers/api/frontend/v1/LvMenu.php @@ -84,7 +84,7 @@ class LvMenu extends FHCAPI_Controller die($p->t('global/fehlerBeimOeffnenDerDatenbankverbindung')); // get the user - if (!$user=get_uid()) + if (!$user=getAuthUID()) die($p->t('global/nichtAngemeldet')); // check if is_lector diff --git a/application/controllers/components/Cis/Mylv.php b/application/controllers/components/Cis/Mylv.php index a8baee753..1fdb7e2a1 100644 --- a/application/controllers/components/Cis/Mylv.php +++ b/application/controllers/components/Cis/Mylv.php @@ -31,7 +31,7 @@ class Mylv extends Auth_Controller { $this->load->model('education/Lehrveranstaltung_model', 'LehrveranstaltungModel'); - $result = $this->LehrveranstaltungModel->getLvsByStudentWithGrades(get_uid()); + $result = $this->LehrveranstaltungModel->getLvsByStudentWithGrades(getAuthUID()); if (isError($result)) return $this->outputJsonError(getError($result)); @@ -45,7 +45,7 @@ class Mylv extends Auth_Controller { $this->load->model('organisation/Studiensemester_model', 'StudiensemesterModel'); - $result = $this->StudiensemesterModel->getWhereStudentHasLvs(get_uid()); + $result = $this->StudiensemesterModel->getWhereStudentHasLvs(getAuthUID()); if (isError($result)) return $this->outputJsonError(getError($result)); @@ -59,7 +59,7 @@ class Mylv extends Auth_Controller { $this->load->model('education/Lehrveranstaltung_model', 'LehrveranstaltungModel'); - $result = $this->LehrveranstaltungModel->getLvsByStudentWithGrades(get_uid(), $studiensemester_kurzbz, getUserLanguage()); + $result = $this->LehrveranstaltungModel->getLvsByStudentWithGrades(getAuthUID(), $studiensemester_kurzbz, getUserLanguage()); if (isError($result)) return $this->outputJsonError(getError($result)); @@ -202,7 +202,7 @@ class Mylv extends Auth_Controller { $this->load->model('education/Pruefung_model', 'PruefungModel'); - $result = $this->PruefungModel->getByStudentAndLv(get_uid(), $lehrveranstaltung_id, getUserLanguage()); + $result = $this->PruefungModel->getByStudentAndLv(getAuthUID(), $lehrveranstaltung_id, getUserLanguage()); if (isError($result)) return $this->outputJsonError(getError($result)); diff --git a/application/controllers/components/Cis/Stundenplan.php b/application/controllers/components/Cis/Stundenplan.php index a88d061cb..a9f35c651 100644 --- a/application/controllers/components/Cis/Stundenplan.php +++ b/application/controllers/components/Cis/Stundenplan.php @@ -14,9 +14,9 @@ class Stundenplan extends Auth_Controller public function __construct() { parent::__construct([ - 'index' => ['student/anrechnung_beantragen:r','user:r'], // TODO(chris): permissions? - 'Reservierungen' => ['student/anrechnung_beantragen:r','user:r'], // TODO(chris): permissions? - 'Stunden' => ['student/anrechnung_beantragen:r','user:r'], // TODO(chris): permissions? + 'index' => ['basis/cis'], + 'Reservierungen' => ['basis/cis'], + 'Stunden' => ['basis/cis'], ]); } @@ -29,12 +29,12 @@ class Stundenplan extends Auth_Controller { $this->load->model('ressource/Stundenplan_model', 'StundenplanModel'); - /* $result = $this->StundenplanModel->loadForUid(get_uid()); + /* $result = $this->StundenplanModel->loadForUid(getAuthUID()); if (isError($result)) return $this->outputJsonError(getError($result)); */ - $res = $this->StundenplanModel->stundenplanGruppierung($this->StundenplanModel->getStundenplanQuery(get_uid())); + $res = $this->StundenplanModel->stundenplanGruppierung($this->StundenplanModel->getStundenplanQuery(getAuthUID())); $res = getData($res); @@ -47,7 +47,7 @@ class Stundenplan extends Auth_Controller { $this->load->model('ressource/Reservierung_model', 'ReservierungModel'); - $result = $this->ReservierungModel->loadForUid(get_uid()); + $result = $this->ReservierungModel->loadForUid(getAuthUID()); if (isError($result)) return $this->outputJsonError(getError($result)); diff --git a/application/controllers/components/CisVue.php b/application/controllers/components/CisVue.php index b5433ebfe..106c6058a 100644 --- a/application/controllers/components/CisVue.php +++ b/application/controllers/components/CisVue.php @@ -5,7 +5,7 @@ if (! defined('BASEPATH')) exit('No direct script access allowed'); /** * */ -class CisVue extends FHC_Controller +class CisVue extends Auth_Controller { /** @@ -13,14 +13,9 @@ class CisVue extends FHC_Controller */ public function __construct() { - parent::__construct(); - - // Loads authentication library and starts authentication - $this->load->library('AuthLib'); - $this->load->library('PermissionLib'); - - if (!isLogged()) - show_404(); + parent::__construct([ + 'Menu' => [self::PERM_LOGGED] + ]); } //------------------------------------------------------------------------------------------------------------------ @@ -32,7 +27,7 @@ class CisVue extends FHC_Controller { $this->load->model('content/Content_model', 'ContentModel'); $menu_contentID = $this->ContentModel->getMenuContentID(); - $result = $this->ContentModel->getMenu($menu_contentID, get_uid()); + $result = $this->ContentModel->getMenu($menu_contentID, getAuthUID()); $menu = getData($result) ?? (object)['childs' => []]; $this->outputJsonSuccess($menu); diff --git a/application/controllers/dashboard/DashboardDemo.php b/application/controllers/dashboard/DashboardDemo.php index 90eb017b8..35d530384 100644 --- a/application/controllers/dashboard/DashboardDemo.php +++ b/application/controllers/dashboard/DashboardDemo.php @@ -16,7 +16,7 @@ class DashboardDemo extends Auth_Controller // Set required permissions parent::__construct( array( - 'index' => 'user:r', + 'index' => 'dashboard/benutzer:r', 'admin' => 'dashboard/admin:rw' ) ); diff --git a/application/libraries/TableWidgetLib.php b/application/libraries/TableWidgetLib.php index 3af99cca7..feda0d67c 100644 --- a/application/libraries/TableWidgetLib.php +++ b/application/libraries/TableWidgetLib.php @@ -26,6 +26,8 @@ class TableWidgetLib { const TABLE_UNIQUE_ID = 'tableUniqueId'; // TableWidget unique id + const TABLE_BOOTSTRAP_VERSION = 'bootstrapVersion'; // TableWidget bootstrap version + // TableWidget session name const SESSION_NAME = 'FHC_TABLE_WIDGET'; diff --git a/application/views/codex/oehbeitrag.php b/application/views/codex/oehbeitrag.php index feebeddef..ba99bbf0c 100644 --- a/application/views/codex/oehbeitrag.php +++ b/application/views/codex/oehbeitrag.php @@ -26,7 +26,6 @@ $this->load->view( ); ?> -
widgetlib->widget('NavigationWidget'); ?> @@ -63,6 +62,5 @@ $this->load->view(
- load->view('templates/FHC-Footer'); ?> diff --git a/application/views/lehre/anrechnung/adminAnrechnung.php b/application/views/lehre/anrechnung/adminAnrechnung.php index 7674a6b31..adef52d64 100644 --- a/application/views/lehre/anrechnung/adminAnrechnung.php +++ b/application/views/lehre/anrechnung/adminAnrechnung.php @@ -7,7 +7,8 @@ $includesArray = array( 'fontawesome6' => true, 'ajaxlib' => true, 'dialoglib' => true, - 'tabulator4' => true, + 'tabulator5' => true, + 'tabulator5JQuery' => true, 'tablewidget' => true, 'sbadmintemplate3' => true, 'navigationwidget' => true, @@ -48,7 +49,8 @@ $includesArray = array( 'public/js/lehre/anrechnung/adminAnrechnung.js' ), 'customCSSs' => array( - 'public/css/sbadmin2/tablesort_bootstrap.css' + 'public/css/sbadmin2/tablesort_bootstrap.css', + 'public/css/lehre/anrechnung.css' ) ); @@ -83,7 +85,8 @@ if (defined("CIS4")) {
@@ -96,48 +99,52 @@ if (defined("CIS4")) { -