mirror of
https://github.com/moodle/moodle.git
synced 2025-04-15 13:33:52 +02:00
web service MDL-17135 add moodle/site:usewebservice capability - display only web service users into administration page
This commit is contained in:
parent
5bed810261
commit
d27c5d3383
@ -223,6 +223,7 @@ $string['site:uploadusers'] = 'Upload new users from file';
|
||||
$string['site:viewfullnames'] = 'Always see full names of users';
|
||||
$string['site:viewparticipants'] = 'View participants';
|
||||
$string['site:viewreports'] = 'View reports';
|
||||
$string['site:usewebservices'] = 'User can be served by Moodle web services';
|
||||
$string['tag:manage'] = 'Manage all tags';
|
||||
$string['tag:create'] = 'Create new tags';
|
||||
$string['tag:edit'] = 'Edit existing tags';
|
||||
|
@ -4947,7 +4947,7 @@ class admin_setting_managewsusersettings extends admin_setting {
|
||||
$table->data = array();
|
||||
|
||||
foreach ($users as $user) {
|
||||
if ( true) { //test if the users has has_capability('use_webservice')
|
||||
if (has_capability("moodle/site:usewebservice",get_system_context(), $user->id)) { //test if the users has has_capability('use_webservice')
|
||||
$wsusersetting = ' <a href="' . $this->baseurl . '&username=' . $user->username . '">'
|
||||
. get_string("settings")
|
||||
.'</a>' . "\n";
|
||||
|
@ -699,6 +699,13 @@ $moodle_capabilities = array(
|
||||
)
|
||||
),
|
||||
|
||||
'moodle/site:usewebservices' => array(
|
||||
'riskbitmask' => RISK_SPAM | RISK_PERSONAL | RISK_XSS | RISK_CONFIG | RISK_DATALOSS,
|
||||
'captype' => 'write',
|
||||
'contextlevel' => CONTEXT_SYSTEM,
|
||||
'legacy' => array()
|
||||
),
|
||||
|
||||
'moodle/course:viewscales' => array(
|
||||
|
||||
'captype' => 'read',
|
||||
|
Loading…
x
Reference in New Issue
Block a user