mirror of
https://github.com/moodle/moodle.git
synced 2025-04-12 20:12:15 +02:00
MDL-28574 webservices: Explain tokens you can edit but can't see
This commit is contained in:
parent
11df55c0dd
commit
72e688d7ff
@ -131,6 +131,7 @@ $string['norequiredcapability'] = 'No required capability';
|
||||
$string['notoken'] = 'The token list is empty.';
|
||||
$string['onesystemcontrolling'] = 'Allow an external system to control Moodle';
|
||||
$string['onesystemcontrollingdescription'] = 'The following steps help you to set up the Moodle web services to allow an external system to interact with Moodle. This includes setting up a token (security key) authentication method.';
|
||||
$string['onlyseecreatedtokens'] = 'Only tokens you own or created can be seen. You can still delete other tokens.';
|
||||
$string['operation'] = 'Operation';
|
||||
$string['optional'] = 'Optional';
|
||||
$string['passwordisexpired'] = 'Password is expired.';
|
||||
|
@ -9531,6 +9531,10 @@ class admin_setting_managewebservicetokens extends admin_setting {
|
||||
|
||||
$return = $OUTPUT->box_start('generalbox webservicestokenui');
|
||||
|
||||
if (has_capability('moodle/webservice:managealltokens', context_system::instance())) {
|
||||
$return .= \html_writer::div(get_string('onlyseecreatedtokens', 'webservice'));
|
||||
}
|
||||
|
||||
$table = new \webservice\token_table('webservicetokens');
|
||||
$table->define_baseurl($baseurl);
|
||||
$table->attributes['class'] = 'admintable generaltable'; // Any need changing?
|
||||
|
@ -159,7 +159,7 @@ class token_table extends \table_sql {
|
||||
global $USER;
|
||||
// Hide the token if it wasn't created by the current user.
|
||||
if ($data->creatorid != $USER->id) {
|
||||
return '';
|
||||
return '-';
|
||||
}
|
||||
|
||||
return $data->token;
|
||||
|
Loading…
x
Reference in New Issue
Block a user