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
This commit is contained in:
Paolo
2018-06-28 16:09:12 +02:00
parent 46e85a2317
commit 8f566e0499
3 changed files with 80 additions and 36 deletions
+1 -1
View File
@@ -25,7 +25,7 @@ class APIv1_Controller extends REST_Controller
/**
* Checks if the caller is allowed to access to this content with the given permissions
* If it is not allowed will set the HTTP header with code 401
* Wrapper for _checkPermissions
* Wrapper for permissionlib->isEntitled
*/
private function _isAllowed($requiredPermissions)
{