Fixed acl on discovery tasklist

This commit is contained in:
Luis Calvo 2020-11-16 18:30:23 +01:00
parent 810db1eec4
commit 2ee187ae53
2 changed files with 6 additions and 2 deletions

View File

@ -448,6 +448,10 @@ class DiscoveryTaskList extends HTML
$table->align[9] = 'left'; $table->align[9] = 'left';
foreach ($recon_tasks as $task) { foreach ($recon_tasks as $task) {
if ($this->aclMulticheck('AR|AW|AM', $task['id_group']) === false) {
continue;
}
$no_operations = false; $no_operations = false;
$data = []; $data = [];
$server_name = servers_get_name($task['id_recon_server']); $server_name = servers_get_name($task['id_recon_server']);

View File

@ -254,7 +254,7 @@ class HTML
* *
* @return boolean Alowed or not. * @return boolean Alowed or not.
*/ */
public function aclMulticheck($access=null) public function aclMulticheck($access=null, $id_group=0)
{ {
global $config; global $config;
@ -268,7 +268,7 @@ class HTML
foreach ($perms as $perm) { foreach ($perms as $perm) {
$allowed = $allowed || (bool) check_acl( $allowed = $allowed || (bool) check_acl(
$config['id_user'], $config['id_user'],
0, $id_group,
$perm $perm
); );
} }