summaryrefslogtreecommitdiff
path: root/includes/view
diff options
context:
space:
mode:
authorFelix Favre <gnomus@gnomus.de>2014-12-15 21:30:52 +0100
committerFelix Favre <gnomus@gnomus.de>2014-12-15 21:31:40 +0100
commitc18c0983fc35ff27bfa038f96fdf465849ee63f0 (patch)
treee00d4a6436b176069aec77436041a29899155c8d /includes/view
parentbe1bb5fbeb2cb93105b12cc9d9b4cae676f59a7f (diff)
only show "arrived" button if user has rights for it
fixes #172
Diffstat (limited to 'includes/view')
-rw-r--r--includes/view/User_view.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/includes/view/User_view.php b/includes/view/User_view.php
index 0d0d9a7e..99ca3eeb 100644
--- a/includes/view/User_view.php
+++ b/includes/view/User_view.php
@@ -184,7 +184,7 @@ function User_view($user_source, $admin_user_privilege, $freeloader, $user_angel
div('col-md-12', array(
buttons(array(
$admin_user_privilege ? button(page_link_to('admin_user') . '&id=' . $user_source['UID'], glyph("edit") . _("edit")) : '',
- ! $user_source['Gekommen'] ? button(page_link_to('admin_arrive') . '&arrived=' . $user_source['UID'], _("arrived")) : '',
+ ($admin_user_privilege && !$user_source['Gekommen']) ? button(page_link_to('admin_arrive') . '&arrived=' . $user_source['UID'], _("arrived")) : '',
$its_me ? button(page_link_to('user_settings'), glyph('list-alt') . _("Settings")) : '',
$its_me ? button(page_link_to('ical') . '&key=' . $user_source['api_key'], glyph('calendar') . _("iCal Export")) : '',
$its_me ? button(page_link_to('shifts_json_export') . '&key=' . $user_source['api_key'], glyph('export') . _("JSON Export")) : '',