Commit Graph

168 Commits

Author SHA1 Message Date
Paolo fbd4ded720 - Added new constants P_NAME_REQUEST_ID and
P_NAME_REQUEST_DATA_FORMATTER tp logLib
- Added new properties _requestId and _requestDataFormatter to LogLib
- Added new public method setConfigs to LogLib
- Added possibility to choose the request id when the LogLib is loaded
- Added possibility to format the request data using the
_requestDataFormatter parameter
- Now LogLib always stores the request id + log level
- Added possibility to change the execution time parameter
- Adapted application/core/JOB_Controller.php code
- Adapted application/core/JQW_Controller.php code
2020-09-11 17:43:39 +02:00
Paolo 40766e7161 Added new public method getJobsByTypeStatusInput to controller core/JQW_Controller 2020-07-22 17:10:11 +02:00
Paolo 747d1d8d32 Fixed bug in application/core/JQW_Controller.php 2020-07-22 13:52:13 +02:00
Paolo 9c732a4870 Added utility methods updateJobs and generateJobs to controller core/JQW_Controller 2020-07-22 13:34:37 +02:00
Paolo be7ea871be - Added new config entry job_schedulers_list to config/jqm.php
- Library JobsQueueLib:
	- Added constant JOB_SCHEDULERS_LIST
	- Constructor now loads the jqm configs
	- Added new public method schedule
2020-07-22 00:56:52 +02:00
Andreas Österreicher c0693b3899 Merge branch 'master' into feature-6656/Worker_queue 2020-06-17 09:03:41 +02:00
Paolo da621a2154 Merge branch 'master' into feature-5491/UDFWidget_add_new_features 2020-03-12 11:19:17 +01:00
Paolo e92880b79a - Added new private methods _checkPermissions and _convertJobs to controller system/jq/JobsQueueManager
- Added new public method updateJobsQueue to controller system/jq/JobsQueueManager
- system/jq/JobsQueueManager->getLastJobs now checks permissions
- Added new public method updateJobsQueue to JQW_Controller
- Less redundant constansts in Library JobsQueueLib
- JobsQueueLib constructor now loads models JobsQueueModel, JobTypesModel and JobStatusesModel
- Added new public methods getLastJobs, addNewJobsToQueue and updateJobsQueue to JobsQueueLib
- Added new private methods _checkNewJobStructure, _checkUpdateJobStructure, _checkJobType, _checkJobStatus, _inArray, _dropNotAllowedPropertiesNewJob and _dropNotAllowedPropertiesUpdateJob to
2020-03-06 14:15:10 +01:00
Paolo cd815acdbf - Added new constant BEGINNING_OF_TIME
- Added new config entry job_type_permissions_white_list in jqm.php
- Added new navigation entry jobsqueueviewer
- Added new model application/models/system/JobsQueue_model.php
- Added new option in FilterWidget for hours comparison with dates
- Added new filter core-jq-lastHour to system/filtersupdate.php
- Added new statements to system/dbupdate_3.3.php to create tables system.tbl_jobstatuses, system.tbl_jobtypes and system.tbl_jobstatuses
- Added new views application/views/system/jq/jobsQueueViewer.php and application/views/system/jq/jobsQueueViewerData.php
2020-03-05 15:57:06 +01:00
Paolo 30c6f10d80 First proposal 2020-03-04 15:54:23 +01:00
Paolo e509f7acd1 Added comments and cleaned code 2019-12-17 16:57:02 +01:00
Paolo 719f2d7314 - Changed controller system/FAS_UDF, less busy now
- Method execReadOnlyQuery of DB_Model less strict check against SQL statements
- Added new public method setup to DB_Model to setup the model after initialization
- Added new constants to UDFLib
- Added new private method _printEndUDFBlock and _printEndUDFBlock to UDFLib
- Added new public methods setUDFUniqueId, getSession, getSessionElement, setSession, setSessionElement, saveUDFs and isAllowed to UDFLib
- Removed model system/FAS_UDF_model
- View views/system/fas_udf now uses the view templates/FHC-Header
- Added new parameter udfs to view templates/FHC-Header
- Added new properties to UDFWidget
- Added new private methods _initUDFWidget, _checkParameters and _startUDFWidget to UDFWidget
2019-12-17 13:35:41 +01:00
Paolo 0f9b29c52e - Added private method _checkHTTPS to core/FHC_Controller
- Method _checkHTTPS is called in core/FHC_Controller constructor immediately after the parent constructor call
- Method _checkHTTPS checks if the HTTPS protocol is enabled and used, if NOT then an error is raised and the execution is terminated
2019-11-25 16:25:10 +01:00
Andreas Österreicher 49f7f61273 Merge branch 'feature-3801/Use_different_source_CI_REST' 2019-10-29 15:17:38 +01:00
Paolo ff858a495d - Added new core controller JOB_Controller
- Added new webservicetyp_kurzbz "job" to table system.tbl_webservicetyp in system/dbupdate_3.3.php
- Added new filter "All jobs viewer"
- Added new __construct to LogLib to set properties
- Added new public methods logInfoDB, logDebugDB, logWarningDB and logErrorDB to LogLib
- Added new private method _logDB to LogLib
- Renamed LogLib private method _format to _getPrefix
- Added new private method _getDatabaseDescription to LogLib
- Changed method _getCaller to use different levels of debug_backtrace
- Added new properties and constants to LogLib to log to the database
2019-08-28 17:26:41 +02:00
Paolo d2e8b01e30 - codeigniter-restserver is now provided and loaded via composer (libraries/REST_Controller.php, config/rest.php, language/english/rest_controller_lang.php, libraries/Format.php, etc)
- Added new core controller core/RESTFul_Controller.php that extends REST_Controller and partially overrides part of the latter
- Changed application/config/rest.php to keep the minimal useful set of configs
- Controllers core/APIv1_Controller, controllers/api/v1/CheckUserAuth.php and controllers/api/v1/Test.php now extend core/RESTFul_Controller
- Changed method _remap interface for core/APIv1_Controller
- Removed application/core/REST_Controller.php
- Removed application/libraries/Format.php
- Removed application/language/english/rest_controller_lang.php
2019-07-31 14:46:31 +02:00
Paolo 477ebe7cc7 - core/Auth_Controller does NOT load anymore hlp_authentication helper
- Added function getAuthPersonId to hlp_authentication helper
- Added function isLogged to hlp_common helper
- hlp_authentication helper functions getAuthPersonId and getAuthUID make use of isLogged function
- AuthLib loads hlp_authentication helper after a successful login or if a user is already logged
- FilterLib does NOT load anymore hlp_authentication helper
- FilterLib does NOT use anymore BenutzerModel and getAuthUID, but retrieves user data directly using the person_id from getAuthPersonId
2019-06-21 13:16:14 +02:00
Paolo d4c7f1f18d Merge branch 'master' into cleanci 2019-04-30 13:14:37 +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 976df3868b - Added new core controller CLI_Controller
- Adapted all the controllers jobs to use this new controller
2019-04-30 13:10:58 +02:00
Paolo 55636c5bb7 Merge branch 'master' into cleanci 2019-04-25 17:06:28 +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 2cf15bcd74 REST_Controller now loads helper hlp_session 2019-04-25 14:53:35 +02:00
Paolo a0967588fb Better error messages in DB_Model 2019-04-25 13:38:46 +02:00
Paolo 286114255e Better error messages in FS_Model 2019-04-25 12:59:07 +02:00
Paolo 699aca74d1 - Changed helper and language autoload
- Changed language config
- Removed never used constants
- Changed rest_language in rest config file
- Adapted models that where extending FHC_Model
- Adapted code to load hlp_return_object
- Adapted code to use exit status codes constants
2019-04-25 12:09:31 +02:00
Paolo 1fe9a95236 Removed controllers/DBTools.php and core/FHC_Model.php 2019-04-24 19:49:34 +02:00
Paolo 02bab0b301 Merge branch 'master' into ciauth 2019-04-12 14:30:28 +02:00
alex 4605413891 FHC-Controller: changed scope of outputJson from private to protected 2019-04-12 14:29:45 +02: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 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 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 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
Andreas Österreicher 0a23698b7e Fixed Loading of UDF Fields in FAS if there are only UDF Fields for
Persons
2018-12-19 07:35:16 +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
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
Andreas Österreicher 96f78a8446 URLs für Message Reply korrigiert 2018-07-17 09:30:32 +02:00
Paolo 04e2e1c54b - Moved functions from FHC-Header to fhc_header_helper
- Added function backwardCompatibleJSMsIe to fhc_header_helper for backward compatibility with older versions of MS IE
- FHC_Controller now loads helper fhc_header too
- Added afarkas/html5shiv and scottjehl/Respond to composer
- Rename function sendMail in fhc_sancho_helper.php to sendSanchoMail
2018-07-11 13:43:18 +02:00
Paolo 37ca34a6b5 - Renamed helpers to avoid conflicts with CI helpers
- Adapted helpers includes
2018-07-11 12:13:39 +02:00
Paolo bfaf4e774b APIv1_Controller now loads helper fhc too 2018-07-10 11:37:04 +02:00
Paolo 83f262f170 - Added helper language_helper to retrive the language of the logged user
- FHC_Controller now loads also the language_helper
- Added missing comments to Auth_Controller
- Fixed comments of session_helper
2018-07-05 12:10:00 +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 8f566e0499 Auth_Controller is now able to display a better message if the user is unauthorized
This message contains:
- the name of the called controller
- the name of the called method of the called controller
- all the possible permissions and related modes needed to acces to this content
2018-06-28 16:09:12 +02:00
Paolo 46e85a2317 Merge branch 'master' into permissions 2018-06-28 14:52:09 +02:00
Paolo 25e66bf9dd - Added function isEmptyString to fhc_helper
- Added function isEmptyArray to fhc_helper
- Adapted the code in application/* to use as much as possible this two new functions
- Removed the php function empty almost everywhere
2018-06-27 15:06:04 +02:00
Paolo d04b0450da - AuthLib is loaded only in fhcauth_helper, PermissionLib and REST_Controller
- Removed all the NOT usefull loads of helpers and libraries
- Fixed undefined index in controllers/system/UDF and model system/UDF_model
- APIv1_Controller now loads helper fhcauth
- FHC_Controller now loads ithe fhc and session helpers too
- Added/Fixed comments
- PermissionLib does NOT use anymore the getAuthUID function from the fhcauth helper, now relies on AuthLib directly
- REST_Controller loads directly the AuthLib when is needed
2018-06-27 13:12:46 +02:00
Paolo d8bcc25ac2 Now the helper message is loaded only by these controllers and models:
- APIv1_Controller
- FHC_Controller
- MessageToken_model
2018-06-27 11:10:40 +02:00
Paolo 81e4f2968e Merge branch 'master' into permissions
- Added new core controller called Auth_Controller that extends FHC_Controller and manage the authentication
- All the controllers that were extending the CI_Controller now they extend the FHC_Controller
- All the controllers that were extending the FHC_Controller now they extend the Auth_Controller
- Added the method isAllowed to the FiltersLib to check if the authenticated user has the required permissions
- FilterWidget and controller Filters are using the method isAllowed from the FiltersLib
2018-06-08 17:53:12 +02:00