Commit Graph

25 Commits

Author SHA1 Message Date
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 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 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
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 bfaf4e774b APIv1_Controller now loads helper fhc too 2018-07-10 11:37:04 +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 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 dda27c7d6e - Removed method isEntitled from PermissionLib
- Renamed method checkPermissions to isEntitled
- isEntitled: if the controller is called from the command line, then is always trusted
- Adapted controllers application/core/APIv1_Controller.php and application/core/FHC_Controller.php
2018-03-29 12:23:05 +02:00
Paolo 1f2450cf17 - Moved _checkPermissions from FHC_Controller to PermissionLib (now is public and it's renamed checkPermissions)
- Added include of PermissionLib in APIv1_Controller
- Added method _isAllowed to APIv1_Controller to call checkPermissions from PermissionLib
- Now the APIv1_Controller constructor requires an array of permissions as parameter
2018-03-20 13:00:35 +01:00
Paolo d8cd786079 - application/core/* -> CS compliant
- application/libraries/* -> CS compliant
- FHC_Model isEntitled method now return error() or success()
- Updated all code that uses isEntitled method from FHC_Model
- Removed Squiz.PHP.DisallowSizeFunctionsInLoops from CS ruleset
- Removed depracated method replace from DB_Model
- Removed unused method pgArrayPhp from DB_Model
- Renamed method arrayMergeIndex to _arrayCombine in DB_Model and set as private
- Added method _manageUDFs to DB_Model (a wrapper for UDFLib->manageUDFs)
2017-08-22 16:24:51 +02:00
Paolo 236cf4ec3d Better log debug output for the name of the called web service 2017-06-13 12:43:42 +02:00
Paolo daa08ea30c Added the query of the restful web service call to the log debug 2017-06-13 12:33:44 +02:00
Paolo 085fed5284 Added a log debug to the constructor of controller APIv1_Controller to
undestand what is the called restful web service
2017-06-13 12:00:24 +02:00
Paolo 2711430eb9 - Renamed TemplateLib to WidgetLib
- Updated controllers and views to use WidgetLib
- Removed TempleteLib from autoload config file
- Removed loading of session library from FHC_Controller (already
present in the autoload configuration file)
2017-03-23 12:25:58 +01:00
bison-paolo 39b4c8057d Removed _parseData workaround 2016-10-19 14:49:54 +02:00
bison-paolo f3b79cd731 - Added method chkRights to DB_Model
- Added method toPhp to DB_Model to convert array and boolean types from PostgresSQL to php
- Added method execQuery to DB_Model to execute a query (it calls toPhp)
- Added method pgsqlArrayToPhpArray to convert a pgsql array to php
- Updated DB_Model methods to using chkRights (and toPhp where it is needed)
- Removed methods escapeArray and _pgsqlArrayToPhpArray from controller APIv1_Controller
- Removed escapeArray from controllers Dokumentstudiengang and Dokument
- Updated models to use execQuery (and chkRights where it is needed)
2016-10-17 17:07:51 +02:00
bison-paolo 8e0ca12deb - All permission functionalities now are in the library PermissionLib
- All return messages functions are in the message helper and it is loaded by the core classes
- Added the missing constant FHC_NOPK
- Updated all the interested classes with the new permission method
- Updated all the interested classes with the new return message functions
2016-10-13 17:53:12 +02:00
bison-paolo 0465c1639f Added a workaround to convert pgsql arrays into php arrays
Affected controllers: Dokument and Dokumentstudiengang
2016-10-10 16:14:48 +02:00
paolo 0c2c0468af - Added helper message with the functions success and error
- Added methods _success and _error to classes FHC_model and APIv1_Controller
2016-06-16 12:15:52 +02:00
Paminger 850777476e Message 2016-06-09 10:00:23 +02:00
Stefan Puraner cf272c0e40 added method to parse post data 2016-05-20 17:34:22 +02:00
paolo 4cc83999ed - Moved class APIv1_Controller from FHC_Controller.php to APIv1_Controller.php
- Moved class DB_Model from FHC_Model.php to DB_Model.php
- load method of class person (person.class.php) now is calling getPerson
  method of the class Person_model
- getAllForBewerbung method of class studiengang (studiengang.class.php) now is calling getAllForBewerbung
  method of the class Studiengang_model
- getStudienplaene method of class studienplan (studienplan.class.php) now is calling getStudienplaene
  method of the class Studienplan_model
2016-04-25 18:25:03 +02:00