freeloader fix, admins should edit user shifts
This commit is contained in:
parent
c589219a96
commit
9d709b2a73
|
@ -122,8 +122,8 @@ function user_myshifts() {
|
||||||
}
|
}
|
||||||
|
|
||||||
$myshift['actions'] = "";
|
$myshift['actions'] = "";
|
||||||
if ($id == $user['UID'])
|
if ($id == $user['UID'] || in_array('user_shifts_admin', $privileges))
|
||||||
$myshift['actions'] .= img_button(page_link_to('user_myshifts') . '&edit=' . $shift['id'], 'pencil', _("edit"));
|
$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))
|
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"));
|
$myshift['actions'] .= img_button(page_link_to('user_myshifts') . (($id != $user['UID']) ? '&id=' . $id : '') . '&cancel=' . $shift['id'], 'cross', _("sign off"));
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue