Commit Graph

293 Commits

Author SHA1 Message Date
Andreas Österreicher 02bd9d528f Fixed Bug where the Last Status was not displayed correctly on the gradelist 2019-05-03 11:15:59 +02:00
Paolo 3b4012798f Fixed some comments typo 2019-04-30 13:13:34 +02:00
Paolo 783910b84c Changed the way to set the header if the user is not authorized 2019-04-30 13:12:12 +02:00
Paolo f65f3daceb - Added private property $_requiredPermissions to APIv1_Controller
- Removed method _isAllowed from APIv1_Controller
- Added public method _remap to APIv1_Controller
- PermissionLib loading moved from constructor to _remap in APIv1_Controller
- Changed method basicAuthentication in AuthLib, now calls loginLDAP
2019-04-25 17:02:43 +02:00
Paolo 34791c96c4 Merge branch 'master' into ciauth 2019-04-17 15:46:27 +02:00
Andreas Österreicher f05ebf3946 Unlocking in Infocenter now always reloads the Dataset and jumps to the correct Filter 2019-04-17 09:15:41 +02:00
Andreas Österreicher b63809abfd Fixed Errorhandling when switching between Users to display correct Errormessages 2019-04-12 15:27:17 +02:00
Paolo 9eaa0b66d7 - Changed AuthLib->loginASByPersonId: now if to the given person_id is linked a uid, then permissions are checked using the uid 2019-03-22 11:54:25 +01:00
Paolo 3abc2e2948 Merge branch 'master' into ciauth 2019-03-21 17:04:51 +01:00
Paolo f92e32d8f0 - Added new public method getLandingPage to AuthLib.php
- AuthLib->redirectToLandingPage now calls getLandingPage
- Added new controller system/Login.php to perform login operations
- Added new view system/login/usernamePassword.php to login with username and password
- Added css/Login.css, images/logo-300x160.png and js/Login.js to be used by usernamePassword.php
2019-03-21 17:00:08 +01:00
Paolo 400a1adfde - Added new entry permission_loginas_personids_blacklist in config file permission.php
- Renamed method loginAS to loginASByUID in AuthLib.php
- Added new public method loginASByPersonId to AuthLib.php
- Renamed method connect to anonymousConnect in LDAPLib
- Method LDAPLib->connectUsernamePassword now checks both username and password if they are empty strings
- Added new constant LOGINAS_PERSONIDS_BLACKLIST to PermissionLib
- Renamed method isEntitledLoginAS to isEntitledLoginASByUID in PermissionLib
- Added new public method isEntitledLoginASByPersonId to PermissionLib
- Added new private method _inLAPersonIdsBlacklist to PermissionLib
2019-03-21 15:36:22 +01:00
Andreas Österreicher fe4017c786 Added function to install extensions from commandline 2019-03-20 16:30:44 +01:00
Paolo 4c2b1731a7 - Added configuration entry authentication_logout_page in auth.php
- Fixed function cleanSessionElement in hlp_session_helper
- Added constants AUTHENTICATION_LOGOUT_PAGE and SESSION_LANDING_PAGE to AuthLib
- Fixed method loginLDAP in AuthLib
- Added public method redirectToLandingPage to AuthLib
- Renamed method _storeAuthObj to _storeSessionAuthObj in AuthLib
- Added private method _storeSessionLandingPage to AuthLib
- Added private method _redirectTemporarily to AuthLib
2019-03-14 13:31:07 +01:00
Paolo 04b1ec327a - Added new config file permission.php
- It contains the following entries:
	- List of permissions that are allowed to perform loginAs
	- List of permissions that cannot be gained with loginAs
	- List of users whose identity cannot be obtained with loginAs
- Removed config entries authentication_loginas_perms and authentication_loginas_blacklist from config file auth.php
- Added constants to PermissionLib: LOGINAS_ALLOWED, LOGINAS_BLACKLIST and LOGINAS_USERS_BLACKLIST
- PermissionLib loads the config file permission.php
- Added public method isEntitledLoginAS to PermissionLib
- Added private methods _inLAUsersBlacklist, _hasLANotAllowedPermissions and _hasLAPermissions to PermissionLib
- Added public method loginAS to AuthLib
- Fixed logout method in AuthLib
- Fixed loginLDAP method in AuthLib
2019-03-13 18:07:15 +01:00
Paolo 53a0b60ba8 - Removed method getCheckUserAuth form api/v1/CheckUserAuth
- Changed LDAP_Model to a library: LDAPLib
- Removed controller system/Login

AuthLib:
- Added new private method _createAuthObjByPerson
- Moved config load from constructor to _authenticate
- Moved Person_Model load from constructor to _createAuthObjByPerson
- Removed method checkUserAuthByCode
- Removed method checkUserAuthByCodeEmail
- Adapted code to use LDAPLib
2019-03-13 11:57:36 +01:00
Paolo fd9a2266ec Added new public method loginLDAP to AuthLib 2019-03-13 10:24:19 +01:00
Paolo d1b4024b76 - Added new constants LDAP_NO_USER_DN and LDAP_TOO_MANY_USER_DN in constants.php
- LDAP_Model->getUserDN now returns errors with more information
- Login redirection is performed with HTTP code 302 instead of 301
- Fixed _checkHBALDAPAuthentication behavior
- AuthLib errors have more information
2019-03-12 16:14:58 +01:00
Paolo 13db712fa7 - Changed authentication_login to AUTH_LDAP in auth.php
- Fixed paths in array authentication_login_pages in ayth.php
- Added new constants AUTHENTICATION_LOGIN and AUTHENTICATION_LOGIN_PAGES to AuthLib
- Added private method _redirectToLogin to AuthLib
- Better comments
2019-03-12 14:00:56 +01:00
Paolo aefd210273 - Added new configuration file auth.php for authentication
- Added new configuration file ldap.php for LDAP connection
- Added new controller system/Login to manage logins
- Added new controller system/Logout to manage logout
- Added new core model LDAP_Model to manage LDAP connections
- Added new constants in config/constants for authentication
- Added new function getCode to hlp_message_helper
- Now core/Auth_Controller loads the AuthLib as first step
- Now PermissionLib does NOT load anymore the AuthLib
- Removed old logic from PermissionLib
- Now function getAuthUID (hlp_authentication_helper) does not load anymore the AuthLib
- Now REST_Controller loads hlp_message_helper and hlp_common_helper
- core/APIv1_Controller does NOT load anymore hlp_message_helper and hlp_common_helper
- Added new constants to AuthLib
- AuthLib constructor now accept a parameter to enable the authentication immediatly (default)
- AuthLib loads configuration file auth.php and Person_model by default
- Added public methods getAuthObj and logout to AuthLib
- Renamed CheckUserAuthByUsernamePassword to checkUserAuthByUsernamePassword, CheckUserAuthByCode to checkUserAuthByCode and CheckUserAuthByCodeEmail to checkUserAuthByCodeEmail in AuthLib
- Added private methods _createAuthObj, _isLogged, _showInvalidAuthentication, _showError, _checkBTAuthentication, _checkHBALDAPAuthentication, _checkLDAPAuthentication, _checkForeignAuthentication, _storeAuthObj and _authenticate to AuthLib
2019-03-12 11:33:01 +01:00
Paolo abf766ce51 - Added session_start() to hlp_session_helper to start a PHP standard session (NOT CI session)
- Added functions cleanSession and cleanSessionElement to hlp_session_helper
- Renamed setElementSession to setSessionElement in hlp_session_helper
- Renamed getElementSession to getSessionElement in hlp_session_helper
- Adapted the code that were using this helper
- Autoload does NOT load anymore helper hlp_session_helper
- Controller controllers/system/Filters now loads the AuthLib
- Removed var_dump from controllers/jobs/ReihungstestJob
2019-03-12 11:16:42 +01:00
Paolo fdddb52259 - Moved REST_Controller from libraries to core directory
- Changed the relatives includes
- Changed the controller api/v1/CheckUserAuth to be adapted to the AuthLib changes
- Removed function auth from helpers/hlp_authentication_helper
- Adapted function getAuthUID of helpers/hlp_authentication_helper to the AuthLib changes
- Adapted constructor of PermissionLib to the AuthLib changes
2019-02-27 11:24:27 +01:00
Paolo 2d7cc09d02 - Added new model CL/Messages_model.php
- Moved logic from controllers system/Messages and ViewMessage to CL/Messages_model
- Better code
- MessageLib and PersonLogLib methods do not use anymore show_error and return success/error object
- helpers/hlp_message_helper: hasData function changed
2019-02-25 15:23:31 +01:00
Paolo e93ee71466 Removed not implemented method 2019-02-15 15:34:48 +01:00
Paolo d82c35f964 Merge branch 'master' into messages 2019-02-15 15:31:55 +01:00
Paolo a913482ef4 - Added private method _replaceKeys to controller system/Messages.php
- Fixed replacement of keys in the message vars array
2019-02-15 15:30:04 +01:00
Andreas Österreicher 7662edd061 Neue Notenübersicht für Studenten
- Ansicht aller LVs die der Studierende lt Studienplan besuchen muss
- Lehrveranstaltungen die ausserhalb des Studienplanes besucht wurden
- Notendurchschnitt pro Semester und über alle Semester nur für
Studienplanrelevante LVs
- Neuer Menüpunkt im FAS für Zugriff auf die Notenliste
2019-02-13 15:52:51 +01:00
Paolo fad7894ec8 Halfway commit 2019-02-08 17:20:36 +01:00
Paolo 91fbabde6f - Added new directory application/views/system/messages/
- Moved application/views/system/message* to application/views/system/messages/
- Adapted code to use those views with the new path
- Fixed function getCode in public/js/AjaxLib.js
- In public/js/messaging/messageWrite.js is now used AjaxLib.js
- Changed method parseMessageText in MessageLib.php to replace the keys of the data parameter
- Removed function write from application/controllers/system/Phrases.php
- Adapted code in application/controllers/system/Messages.php to use the changed method parseMessageText in MessageLib.php and path of the moved views
2019-02-06 18:18:57 +01:00
Paolo b58475d6c5 - FilterWidget can represents the retrieved data with tablesorter or pivotUI
- Added new constants to FiltersLib
- Added new parameter pivotui to FHC-Header to load JS and CSS for pivotUI
- Renamed constat WIDGET_URL_TABLE_DATASET to WIDGET_URL_DATASET_TABLESORTER in FilterWidget
- Added new constat WIDGET_URL_DATASET_PIVOTUI to FilterWidget
- Added new private properties _datasetRepresentation and _datasetRepresentationOptions to FilterWidget
- Renamed FilterWidget->loadViewTableDataset to loadViewDataset
- FilterWidget->loadViewDataset loads tablesorter or pivotUI view depending on the value of property _datasetRepresentation
- FilterWidget accepts two new parameter: datasetRepresentation and datasetRepOptions
- datasetRepresentation is required
- FilterWidget stores in session the _datasetRepresentation and _datasetRepresentationOptions properties
- Adapted view views/widgets/filter/filter to use loadViewDataset
- All views using FilterWidget have been adapted to use the required parameter datasetRepresentation
- Added new constats DATASET_REP_TABLESORTER and DATASET_REP_PIVOTUI to public/js/FilterWidget.js
- Added new private property _datasetRepresentation to FHC_FilterWidget in public/js/FilterWidget.js
- Based on property _datasetRepresentation FilterWidget.js will represent the FilterWidget data with tablesorter or pivotUI
- Added new private method _renderDataset to FHC_FilterWidget in public/js/FilterWidget.js
- Renamed method _renderTableDataset to _renderDatasetTablesorter in FHC_FilterWidget in public/js/FilterWidget.js
- Added new method _renderDatasetPivotUI to FHC_FilterWidget in public/js/FilterWidget.js
- Added bew method _setDatasetRepresentation to FHC_FilterWidget in public/js/FilterWidget.js
2019-02-05 10:38:22 +01:00
Paolo 2bf2cac383 - Added new method writeReply to FASMessages
- Moved logic from Messages and MessageLib to MessageLib\
- Better code in views/system/messageWrite.php
- Adapted content/messages.js.php to use writeReply
2019-02-01 12:04:20 +01:00
Paolo 306da46c80 - Removed messagelink from controller system/infocenter/InfoCenter.php
- Improved MessageLib
- Added method getMessageVarsPerson to MessageLib
- Moved JS from views/system/messageWrite.php to public/js/messaging/messageWrite.js
- Added new controller controllers/system/FASMessages.php
- Adapted content/fasoverlay.js.php and content/messages.js.php to use FASMessages
2019-01-25 17:16:57 +01:00
Paolo fa9976ec66 - FilterWidget can represents the retrieved data with tablesorter or pivotUI
- Added new constants to FiltersLib
- Added new parameter pivotui to FHC-Header to load JS and CSS for pivotUI
- Renamed constat WIDGET_URL_TABLE_DATASET to WIDGET_URL_DATASET_TABLESORTER in FilterWidget
- Added new constat WIDGET_URL_DATASET_PIVOTUI to FilterWidget
- Added new private properties _datasetRepresentation and _datasetRepresentationOptions to FilterWidget
- Renamed FilterWidget->loadViewTableDataset to loadViewDataset
- FilterWidget->loadViewDataset loads tablesorter or pivotUI view depending on the value of property _datasetRepresentation
- FilterWidget accepts two new parameter: datasetRepresentation and datasetRepOptions
- datasetRepresentation is required
- FilterWidget stores in session the _datasetRepresentation and _datasetRepresentationOptions properties
- Adapted view views/widgets/filter/filter to use loadViewDataset
- All views using FilterWidget have been adapted to use the required parameter datasetRepresentation
- Added new constats DATASET_REP_TABLESORTER and DATASET_REP_PIVOTUI to public/js/FilterWidget.js
- Added new private property _datasetRepresentation to FHC_FilterWidget in public/js/FilterWidget.js
- Based on property _datasetRepresentation FilterWidget.js will represent the FilterWidget data with tablesorter or pivotUI
- Added new private method _renderDataset to FHC_FilterWidget in public/js/FilterWidget.js
- Renamed method _renderTableDataset to _renderDatasetTablesorter in FHC_FilterWidget in public/js/FilterWidget.js
- Added new method _renderDatasetPivotUI to FHC_FilterWidget in public/js/FilterWidget.js
- Added bew method _setDatasetRepresentation to FHC_FilterWidget in public/js/FilterWidget.js
2019-01-11 15:14:53 +01:00
Paolo e0b1c78eef - Bugfix: fixed method generateFilterMenu of FiltersLib to generate the correct link for menu entries
- Bugfix: system/Filters_model is loaded in every methods of FiltersLib and FilterWidget where it is used
2018-12-10 12:24:28 +01:00
Andreas Österreicher a9dfe7d5ed Infocenter Navigation angepasst damit auch auf Unterseiten zwischen den
filtern gewechselt werden kann
2018-12-07 12:12:45 +01:00
Cris 38b195beeb Optimized Reihungstest-chronjob code
. Optimized code by retreiving data directly via model.
. Extended SQL query: study courses are now checked for active = true
2018-12-06 12:42:48 +01:00
Cris 41b55cf571 Added Reihungstest-chronjob -> sends info with Sancho mail
The job
-- checks if there are active studyplans which have no public placement tests assigned yet 
-- retrieves faculty and amount of free places for each public placement test date.

This information is then sent by email in Sancho design.
2018-12-05 16:58:38 +01:00
alex a28df53718 Infocenter changes
- new button for Freigabe zum Reihungstest, sending message to bewerber when freigabe
- button Freigabe for Studiengang with Statusgrund
- Ausbildungssemester can be saved
- Using Vorlagen for Freigabe Mail to assistance and message to bewerber
- Added Nation of address at details page
- Scroll to top button on details page
- moved messageList js to own file
2018-11-30 16:48:28 +01:00
Paolo 7a9eda3912 - Added new public method setNavigationMenu to controller system/Filters.php
- Method _setNavigationMenuFreigegeben of system/infocenter/InfoCenter controller now generate only the menu entry "Home"
- Added new const CUSTOM_MENU to FiltersLib to represent new FilterWidget parameter to specify if the menu for this filter is custom
- Added new consts NAV_MENU_FILTER_KEY, NAV_MENU_FILTER_NAME, NAV_MENU_CUSTOM_FILTER_KEY and NAV_MENU_CUSTOM_FILTER_NAME to FiltersLib as name and array keys of the filters menu array
- Added new const NAVIGATION_PAGE to FiltersLib which represents the navigation page parameter name
- Added new public method generateFilterMenu to FiltersLib to generate the filters menu structure array and stores it into the session
- Fixed methods setElementSessionMenu and setElementSessionHeader in NavigationLib
- Added new public method getFiltersByAppDatasetName to Filters_model to load all filters by their app and dataset_name
- Added new private property _customMenu to FilterWidget
- If _customMenu is NOT true then the new private method _setFilterMenu is called
- View infocenter/infocenterData.php: arranged the code differently and set customMenu as true
- View infocenter/infocenterFreigegebenData.php: arranged the code differently
- Added new global function refreshSideMenuHook to FilterWidget.js
- Renamed private method _getNavigationWidgetCalled to getNavigationPage in NavigationWidget.js
- Method refreshSideMenuHook of NavigationWidget.js now can accept parameters to give them to the ajax call
- In infocenterPersonDataset.js the function refreshSideMenuHook is declared only if the page is the index page
2018-11-30 14:58:38 +01:00
Paolo a741ffbd41 - InfoCenter controller methods _fillFilters, _fillFiltersFreigegeben and _fillCustomFilters now use NavigationLib->oneLevel
- NavigationLib added parameter subscriptLinkHref to oneLevel
- NavigationWidget.js method _buildLeftMenuStructure now uses parameter subscriptLinkHref
2018-11-23 18:04:40 +01:00
Paolo 0509a26b1e Removed not useful code 2018-11-23 11:36:22 +01:00
Paolo 08af558e8f - Better code in application/libraries/LogLib.php
- Added private property debugMode to application/core/DB_Model.php
- application/core/DB_Model.php now loads Loglib
- Added private method _logLastQuery to application/core/DB_Model.php
- Placed _logLastQuery in DB_Model methods: insert, update, delete, loadWhere, loadTree, execQuery
- DB_Model method load now calls method loadWhere
2018-11-21 14:59:31 +01:00
Andreas Österreicher e2fd07aa84 - Added E-Mail Header Precedence:bulk and Auto-submitted: auto-generated
to CI Mail Lib
- Sancho Mails are sent now with the new Mail Headers
2018-09-25 14:41:13 +02:00
Paolo bb52aee900 - Moved spl_autoload_register from application/config/config.php to application/config/core_includes.php
- application/config/core_includes.php is included by index.ci.php
- Renamed the prefix of the helpers from "fhc_" to "hlp_"
- Adapted the helpers includes
2018-07-18 12:04:00 +02:00
Paolo 37ca34a6b5 - Renamed helpers to avoid conflicts with CI helpers
- Adapted helpers includes
2018-07-11 12:13:39 +02:00
Paolo d08eb75b5a Adapted MessageLib, PhrasesLib and UDFLib to use the function getUserLanguage from language_helper 2018-07-05 12:13:02 +02:00
Paolo 56524dcef2 Merge branch 'master' into permissions 2018-07-02 17:44:14 +02:00
Paolo 419e53a656 - Changed filtersupdate to better divide filters for infocenter overview and freigegeben
- Changed infocenterData to retrive overview filters
- Changed infocenterFreigegebenData to retrive freigegeben filters
- Changed InfoCenter controller to load overview and freigegeben filter's names into the left menu
2018-07-02 17:40:22 +02:00
Paolo 9ff3eeff75 - PermissionLib uses isEmptyArray, added comments
- Added requiredPermissions property to the navigation array in the config navigation.php
- Added constant PERMISSION_NAVIGATION_METHOD to NavigationLib
- Added parameter and array element requiredPermissions to method oneLevel of NavigationLib
- Renamed method _sortArray to _sortNavigationArray in NavigationLib
- Added private method _rmNotAllowedEntries to NavigationLib to remove menu entries that the logged user is not allow to use
2018-06-29 12:31:45 +02:00
Paolo 845975ebfe Method hasAtLeastOne of PermissionLib can check permissions with a fixed given permission type
or retrive the permission type from each element of the requiredPermissions array
2018-06-29 12:02:05 +02:00
Paolo 2cba129076 - Added method hasAtLeastOne to the library PermissionLib
- Adapted the method isAllowed of the library FiltersLib to use hasAtLeastOne
- Corrected/added comments
2018-06-29 11:51:16 +02:00