webservice MDL-23438 do not create a token for a user if the service doesn't allow him

This commit is contained in:
jerome mouneyrac
2010-09-24 07:06:47 +00:00
parent a44460b5ef
commit a089b8d131
+1 -1
View File
@@ -69,7 +69,7 @@ switch ($action) {
if ($selectedservice->restrictedusers) {
$restricteduser = $webservicemanager->get_ws_authorised_user($data->service, $data->user);
if (empty($restricteduser)) {
$allowuserurl = new moodle_url('/admin/webservice/service_users.php',
$allowuserurl = new moodle_url('/' . $CFG->admin . '/webservice/service_users.php',
array('id' => $selectedservice->id));
$allowuserlink = html_writer::tag('a', $selectedservice->name , array('href' => $allowuserurl));
$errormsg = $OUTPUT->notification(get_string('usernotallowed', 'webservice', $allowuserlink));