Skip to content

Commit

Permalink
planning, don't display events if no rights to see them
Browse files Browse the repository at this point in the history
  • Loading branch information
orthagh committed Jul 13, 2016
1 parent 74f7031 commit 00749ab
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions inc/planning.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -1068,6 +1068,9 @@ static function showSingleLinePlanningFilter($filter_key, $filter_data, $options
$group->getFromDB($actor[1]);
$title = $group->getName();
} else if($filter_data['type'] == 'event_filter') {
if (!$filter_key::canView()) {
return false;
}
$title = $filter_key::getTypeName();
}

Expand Down Expand Up @@ -1630,6 +1633,9 @@ static function constructEventsArray($options = array()) {

$raw_events = array();
foreach($CFG_GLPI['planning_types'] as $planning_type) {
if (!$planning_type::canView()) {
continue;
}
if ($_SESSION['glpi_plannings']['filters'][$planning_type]['display']) {
$event_type_color = $_SESSION['glpi_plannings']['filters'][$planning_type]['color'];
foreach($_SESSION['glpi_plannings']['plannings'] as $actor => $actor_params) {
Expand Down

0 comments on commit 00749ab

Please sign in to comment.