mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-19 16:02:15 +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:
@@ -29,7 +29,7 @@ class APIv1_Controller extends REST_Controller
|
||||
*/
|
||||
private function _isAllowed($requiredPermissions)
|
||||
{
|
||||
if (!$this->permissionlib->checkPermissions($requiredPermissions, $this->router->method))
|
||||
if (!$this->permissionlib->isEntitled($requiredPermissions, $this->router->method))
|
||||
{
|
||||
$this->response(error('You are not allowed to access to this content'), REST_Controller::HTTP_UNAUTHORIZED);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user