mirror of
https://github.com/moodle/moodle.git
synced 2025-04-13 20:42:22 +02:00
Merge branch 'MDL-81476-main' of https://github.com/stevandoMoodle/moodle
This commit is contained in:
commit
ef2b329fef
@ -317,9 +317,14 @@ class users extends system_report {
|
||||
false,
|
||||
new lang_string('denyaccess', 'mnet'),
|
||||
))->add_callback(static function(\stdclass $row) use ($DB, $contextsystem): bool {
|
||||
$acl = $DB->get_record('mnet_sso_access_control', ['username' => $row->username, 'mnet_host_id' => $row->mnethostid]);
|
||||
if (!$accessctrl = $DB->get_field(table: 'mnet_sso_access_control', return: 'accessctrl',
|
||||
conditions: ['username' => $row->username, 'mnet_host_id' => $row->mnethostid]
|
||||
)) {
|
||||
$accessctrl = 'allow';
|
||||
}
|
||||
|
||||
return has_capability('moodle/user:update', $contextsystem) && !$row->suspended &&
|
||||
is_mnet_remote_user($row) && $acl->accessctrl == 'allow';
|
||||
is_mnet_remote_user($row) && $accessctrl == 'allow';
|
||||
}));
|
||||
|
||||
// Action to unsuspend users (mnet remote users).
|
||||
@ -330,9 +335,14 @@ class users extends system_report {
|
||||
false,
|
||||
new lang_string('allowaccess', 'mnet'),
|
||||
))->add_callback(static function(\stdclass $row) use ($DB, $contextsystem): bool {
|
||||
$acl = $DB->get_record('mnet_sso_access_control', ['username' => $row->username, 'mnet_host_id' => $row->mnethostid]);
|
||||
if (!$accessctrl = $DB->get_field(table: 'mnet_sso_access_control', return: 'accessctrl',
|
||||
conditions: ['username' => $row->username, 'mnet_host_id' => $row->mnethostid]
|
||||
)) {
|
||||
$accessctrl = 'allow';
|
||||
}
|
||||
|
||||
return has_capability('moodle/user:update', $contextsystem) && !$row->suspended &&
|
||||
is_mnet_remote_user($row) && $acl->accessctrl == 'deny';
|
||||
is_mnet_remote_user($row) && $accessctrl == 'deny';
|
||||
}));
|
||||
|
||||
// Action to delete users.
|
||||
|
Loading…
x
Reference in New Issue
Block a user