Merge branch 'MDL-26635' of git://github.com/mouneyrac/moodle

This commit is contained in:
Sam Hemelryk
2011-09-21 17:52:53 +12:00
2 changed files with 2 additions and 1 deletions
+1
View File
@@ -26,6 +26,7 @@
$string['accessexception'] = 'Access control exception';
$string['accessnotallowed'] = 'Access to web service not allowed';
$string['actwebserviceshhdr'] = 'Active web service protocols';
$string['accesstofunctionnotallowed'] = 'Access to the function {$a}() 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.';
$string['addaservice'] = 'Add service';
$string['addcapabilitytousers'] = 'Check users capability';
$string['addcapabilitytousersdescription'] = 'Users should have two capabilities - webservice:createtoken and a capability matching the protocols used, for example webservice/rest:use, webservice/soap:use. To achieve this, create a web services role with the appropriate capabilities allowed and assign it to the web services user as a system role.';
+1 -1
View File
@@ -1310,7 +1310,7 @@ abstract class webservice_base_server extends webservice_server {
}
$rs->close();
if (!$allowed) {
throw new webservice_access_exception('Access to external function not allowed');
throw new webservice_access_exception(get_string('accesstofunctionnotallowed', 'webservice', $this->functionname));
}
// we have all we need now