summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
authorPhilip Häusler <msquare@notrademark.de>2013-12-27 18:56:20 +0100
committerPhilip Häusler <msquare@notrademark.de>2013-12-27 18:56:20 +0100
commit9d709b2a7349fc5b2ad9d84ddc36c505cccafed1 (patch)
tree981deea293d53f462bae57cde43c176e45858556 /includes
parentc589219a962203ddb2a8b3899f964ca5ae5209ef (diff)
freeloader fix, admins should edit user shifts
Diffstat (limited to 'includes')
-rw-r--r--includes/pages/user_myshifts.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/includes/pages/user_myshifts.php b/includes/pages/user_myshifts.php
index c8b9ca0f..1395d3bf 100644
--- a/includes/pages/user_myshifts.php
+++ b/includes/pages/user_myshifts.php
@@ -122,8 +122,8 @@ function user_myshifts() {
}
$myshift['actions'] = "";
- if ($id == $user['UID'])
- $myshift['actions'] .= img_button(page_link_to('user_myshifts') . '&edit=' . $shift['id'], 'pencil', _("edit"));
+ if ($id == $user['UID'] || in_array('user_shifts_admin', $privileges))
+ $myshift['actions'] .= img_button(page_link_to('user_myshifts') . '&edit=' . $shift['id'] . '&id=' . $id, 'pencil', _("edit"));
if (($shift['start'] > time() + $LETZTES_AUSTRAGEN * 3600) || in_array('user_shifts_admin', $privileges))
$myshift['actions'] .= img_button(page_link_to('user_myshifts') . (($id != $user['UID']) ? '&id=' . $id : '') . '&cancel=' . $shift['id'], 'cross', _("sign off"));