Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Browse files

MDL-31209 web service error message: Indication about the service not…

… containg the web service function is confusing
  • Loading branch information...
commit ad28e1b6a39673afbb8ad7c1d2582ebbe4d753a4 1 parent f0d8c53
@mouneyrac mouneyrac authored
Showing with 11 additions and 4 deletions.
  1. +11 −4 webservice/lib.php
15 webservice/lib.php
@@ -1633,10 +1633,17 @@ protected function load_function_info() {
if (!$allowed) {
throw new webservice_access_exception(
'Access to the function '.$this->functionname.'() is not allowed.
- Please check if a service containing the function is enabled.
- In the service settings: if the service is restricted check that
- the user is listed. Still in the service settings check for
- IP restriction or if the service requires a capability.');
+ There could be multiple reasons for this:
+ 1. The service linked to the user token does not contain the function.
+ 2. The service is user-restricted and the user is not listed.
+ 3. The service is IP-restricted and the user IP is not listed.
+ 4. The service is time-restricted and the time has expired.
+ 5. The token is time-restricted and the time has expired.
+ 6. The service requires a specific capability which the user does not have.
+ 7. The function is called with username/password (no user token is sent)
+ and none of the services has the function to allow the user.
+ These settings can be found in Administration > Site administration
+ > Plugins > Web services > External services and Manage tokens.');
// we have all we need now

0 comments on commit ad28e1b

Please sign in to comment.
Something went wrong with that request. Please try again.