X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/timetracker.git/blobdiff_plain/948617a6a0f129ba4090934ee8f544009dbcd935..b134135b685422ddcdc2d6856972c60ea15f661f:/time.php diff --git a/time.php b/time.php index 5307d8b2..6d62fb69 100644 --- a/time.php +++ b/time.php @@ -124,10 +124,11 @@ if ($user->can('manage_subgroups')) { } // SUBGROUP_DEBUG if ($user->can('track_time')) { + $rank = $user->getMaxRankForGroup($on_behalf_group_id); if ($user->can('track_own_time')) - $options = array('status'=>ACTIVE,'max_rank'=>$user->rank-1,'include_self'=>true,'self_first'=>true); + $options = array('group_id'=>$on_behalf_group_id,'status'=>ACTIVE,'max_rank'=>$rank,'include_self'=>true,'self_first'=>true); else - $options = array('status'=>ACTIVE,'max_rank'=>$user->rank-1); + $options = array('group_id'=>$on_behalf_group_id,'status'=>ACTIVE,'max_rank'=>$rank); $user_list = $user->getUsers($options); if (count($user_list) >= 1) { $form->addInput(array('type'=>'combobox',