mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-22 09:22:22 +00:00
- 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:
@@ -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';
|
||||
|
||||
Reference in New Issue
Block a user