| Línea 4... |
Línea 4... |
| 4 |
|
4 |
|
| 5 |
$ADMIN->add('users', new admin_category('accounts', new lang_string('accounts', 'admin')));
|
5 |
$ADMIN->add('users', new admin_category('accounts', new lang_string('accounts', 'admin')));
|
| 6 |
$ADMIN->add('users', new admin_category('roles', new lang_string('permissions', 'role')));
|
6 |
$ADMIN->add('users', new admin_category('roles', new lang_string('permissions', 'role')));
|
| Línea 7... |
Línea 7... |
| 7 |
$ADMIN->add('users', new admin_category('privacy', new lang_string('privacyandpolicies', 'admin')));
|
7 |
$ADMIN->add('users', new admin_category('privacy', new lang_string('privacyandpolicies', 'admin')));
|
| 8 |
|
8 |
|
| 9 |
if ($hassiteconfig
|
9 |
$capabilities = [
|
| 10 |
or has_capability('moodle/user:create', $systemcontext)
|
10 |
'moodle/user:create',
|
| 11 |
or has_capability('moodle/user:update', $systemcontext)
|
11 |
'moodle/user:update',
|
| 12 |
or has_capability('moodle/user:delete', $systemcontext)
|
12 |
'moodle/user:delete',
|
| - |
|
13 |
'moodle/role:manage',
|
| - |
|
14 |
'moodle/role:assign',
|
| 13 |
or has_capability('moodle/role:manage', $systemcontext)
|
15 |
'moodle/cohort:manage',
|
| - |
|
16 |
'moodle/cohort:view',
|
| - |
|
17 |
'moodle/cohort:configurecustomfields',
|
| - |
|
18 |
'moodle/role:safeoverride',
|
| - |
|
19 |
'moodle/role:override',
|
| 14 |
or has_capability('moodle/role:assign', $systemcontext)
|
20 |
];
|
| Línea 15... |
Línea 21... |
| 15 |
or has_capability('moodle/cohort:manage', $systemcontext)
|
21 |
|
| 16 |
or has_capability('moodle/cohort:view', $systemcontext)) { // Speedup for non-admins, add all caps used on this page.
|
22 |
if ($hassiteconfig || has_any_capability($capabilities, $systemcontext)) { // Speedup for non-admins, all caps used on this page.
|
| 17 |
|
23 |
|