User shift admins see free and occupied shifts by default

This commit is contained in:
Philip Häusler 2015-08-13 11:22:25 +02:00
parent df526fa2bf
commit 723961c19e
1 changed files with 6 additions and 2 deletions

View File

@ -371,9 +371,13 @@ function view_user_shifts() {
$_SESSION['user_shifts'] = array(); $_SESSION['user_shifts'] = array();
if (! isset($_SESSION['user_shifts']['filled'])) { if (! isset($_SESSION['user_shifts']['filled'])) {
$_SESSION['user_shifts']['filled'] = array( // User shift admins see free and occupied shifts by default
$_SESSION['user_shifts']['filled'] = in_array('user_shifts_admin', $privileges) ? [
0,
1
] : [
0 0
); ];
} }
foreach (array( foreach (array(