- 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
This commit is contained in:
Paolo
2018-03-29 12:23:05 +02:00
parent 042f187818
commit dda27c7d6e
3 changed files with 7 additions and 31 deletions
+1 -1
View File
@@ -28,7 +28,7 @@ class FHC_Controller extends CI_Controller
*/
private function _isAllowed($requiredPermissions)
{
if (!$this->permissionlib->checkPermissions($requiredPermissions, $this->router->method))
if (!$this->permissionlib->isEntitled($requiredPermissions, $this->router->method))
{
header('HTTP/1.0 401 Unauthorized');
echo 'You are not allowed to access to this content';