Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-31209

web service error message: Indication about the service not containg the web service function is confusing

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Trivial
    • Resolution: Fixed
    • Affects Version/s: 2.2.1, 2.3.7, 2.4.4, 2.5
    • Fix Version/s: 2.3.8, 2.4.5, 2.5.1
    • Component/s: Web Services
    • Labels:
    • Testing Instructions:
      Hide

      Create a service that authorise users
      Add a user to this service
      On the page where you added the user, click on the name. You arrive on the user settings. here enter an IP address which is not yours.
      Create a ws token linked to this service.
      Call a webservice (use REST demo client for example: https://github.com/moodlehq/sample-ws-clients/tree/master/PHP-REST) and check that the returned error message is clear enough. See the commit to check that the text error message match the changes.

      Show
      Create a service that authorise users Add a user to this service On the page where you added the user, click on the name. You arrive on the user settings. here enter an IP address which is not yours. Create a ws token linked to this service. Call a webservice (use REST demo client for example: https://github.com/moodlehq/sample-ws-clients/tree/master/PHP-REST ) and check that the returned error message is clear enough. See the commit to check that the text error message match the changes.
    • Affected Branches:
      MOODLE_22_STABLE, MOODLE_23_STABLE, MOODLE_24_STABLE, MOODLE_25_STABLE
    • Fixed Branches:
      MOODLE_23_STABLE, MOODLE_24_STABLE, MOODLE_25_STABLE
    • Pull Master Branch:
      MDL-31209-master

      Description

      Following MDL-31138, the error message could be more accurate:

      "Access to the function local_wstemplate_hello_world() 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"

      We should advice to check that the service linked to the token contains the called function. PS: in the case of username/password authentication, no specific service is linked. The current error message is more matching this authentication method.

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  8/Jul/13