mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-31 01:35:36 +02:00
#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;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
$labels[] = $this->controlSizeText($row['nombre']);
|
$labels[] = $this->controlSizeText(io_safe_output($row['nombre']));
|
||||||
$data[] = $row['total'];
|
$data[] = $row['total'];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -233,7 +233,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="row">
|
<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="container" id="Alerts">
|
||||||
<div class="title br-b">
|
<div class="title br-b">
|
||||||
<?php echo $Alerts->title; ?>
|
<?php echo $Alerts->title; ?>
|
||||||
@ -252,14 +252,17 @@
|
|||||||
<?php echo $Alerts->getActiveCorrelation(); ?>
|
<?php echo $Alerts->getActiveCorrelation(); ?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div id="list-users">
|
<?php if ($Alerts->checkAclUserList() === true) : ?>
|
||||||
<div class="subtitle link padding10 padding2 br-t">
|
<div id="list-users">
|
||||||
<b><?php echo __('Logged in users (24 hrs)'); ?></b> <a href=""><?php echo __('More details'); ?></a>
|
<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>
|
</div>
|
||||||
<?php echo $Alerts->getDataTableUsers(); ?>
|
<?php endif; ?>
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<?php if ($Events->checkAcl() === true) : ?>
|
||||||
<div class="col-md-9 pdd_5px">
|
<div class="col-md-9 pdd_5px">
|
||||||
<div class="container overflow_hidden" id="Events">
|
<div class="container overflow_hidden" id="Events">
|
||||||
<div class="title br-b">
|
<div class="title br-b">
|
||||||
@ -300,8 +303,8 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
<?php endif; ?>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
Loading…
x
Reference in New Issue
Block a user