Skip to content

Commit

Permalink
Merge branch 'MDL-74202' of https://github.com/paulholden/moodle
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewnicols committed Apr 7, 2022
2 parents f57461c + 17dd5bb commit 3291ee4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion webservice/lib.php
Expand Up @@ -1137,7 +1137,8 @@ protected function authenticate_user() {
$this->userid = $user->id;

if ($this->authmethod != WEBSERVICE_AUTHMETHOD_SESSION_TOKEN && !has_capability("webservice/$this->wsname:use", $this->restricted_context)) {
throw new webservice_access_exception('You are not allowed to use the {$a} protocol (missing capability: webservice/' . $this->wsname . ':use)');
throw new webservice_access_exception("You are not allowed to use the {$this->wsname} protocol " .
"(missing capability: webservice/{$this->wsname}:use)");
}

external_api::set_context_restriction($this->restricted_context);
Expand Down

0 comments on commit 3291ee4

Please sign in to comment.