Merge branch 'ent-6645-bug-acl-discovery-tasks' into 'develop'

Fixed acl on discovery tasklist

See merge request artica/pandorafms!3618
This commit is contained in:
Daniel Rodriguez 2021-01-14 14:43:42 +01:00
commit ea86889673
2 changed files with 6 additions and 2 deletions

View File

@ -450,6 +450,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
); );
} }