#10194 added acl
This commit is contained in:
parent
1a89761727
commit
44c654cdb4
|
@ -236,4 +236,17 @@ class Alerts extends Element
|
|||
}
|
||||
|
||||
|
||||
/**
|
||||
* Check if user can manager users.
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public function checkAclUserList():bool
|
||||
{
|
||||
global $config;
|
||||
$user_m = (bool) check_acl($config['id_user'], 0, 'UM');
|
||||
return $user_m;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -340,4 +340,17 @@ class Events extends Element
|
|||
}
|
||||
|
||||
|
||||
/**
|
||||
* Check permission user for view events section.
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public function checkAcl():bool
|
||||
{
|
||||
global $config;
|
||||
$event_a = (bool) check_acl($config['id_user'], 0, 'ER');
|
||||
return $event_a;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -166,7 +166,7 @@ class MonitoringElements extends Element
|
|||
continue;
|
||||
}
|
||||
|
||||
$labels[] = $this->controlSizeText($row['nombre']);
|
||||
$labels[] = $this->controlSizeText(io_safe_output($row['nombre']));
|
||||
$data[] = $row['total'];
|
||||
}
|
||||
|
||||
|
|
|
@ -233,7 +233,7 @@
|
|||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-3 pdd_5px">
|
||||
<div class="<?php echo (($Events->checkAcl() === true)) ? 'col-md-3 pdd_5px' : 'col-12 pdd_5px'; ?>">
|
||||
<div class="container" id="Alerts">
|
||||
<div class="title br-b">
|
||||
<?php echo $Alerts->title; ?>
|
||||
|
@ -252,14 +252,17 @@
|
|||
<?php echo $Alerts->getActiveCorrelation(); ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php if ($Alerts->checkAclUserList() === true) : ?>
|
||||
<div id="list-users">
|
||||
<div class="subtitle link padding10 padding2 br-t">
|
||||
<b><?php echo __('Logged in users (24 hrs)'); ?></b> <a href=""><?php echo __('More details'); ?></a>
|
||||
</div>
|
||||
<?php echo $Alerts->getDataTableUsers(); ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php if ($Events->checkAcl() === true) : ?>
|
||||
<div class="col-md-9 pdd_5px">
|
||||
<div class="container overflow_hidden" id="Events">
|
||||
<div class="title br-b">
|
||||
|
@ -300,8 +303,8 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
|
|
Loading…
Reference in New Issue