Bug: In/Out Punches still available when permission removed

Discussion for TimeTrex open source community developers.
Locked
lb
Posts: 14
Joined: Sun Jun 01, 2008 4:58 pm

Bug: In/Out Punches still available when permission removed

Post by lb »

When punch IN/OUT is denied in the permissions group, the Punch button and IN/Out rows still show on the main timesheet window. Suggested fixes for rows and button respectively are:

Code: Select all

*** ViewUserTimeSheet.php.dist  Fri Apr 11 17:08:05 2008
--- ViewUserTimeSheet.php       Tue Jul  1 18:49:19 2008
***************
*** 486 ****
!               $stop = FALSE;
--- 486,490 ----
!               if ( $permission->Check('punch','punch_in_out') ) {
!                       $stop = FALSE;
!               } else {
!                       $stop = TRUE;
!               }
and

Code: Select all

*** ViewUserTimeSheet.tpl.dist  Fri Apr 11 17:07:59 2008
--- ViewUserTimeSheet.tpl       Tue Jul  1 18:54:35 2008
***************
*** 125 ****
!                                                       {if ( $permission->Check('punch','add') AND ( $permission->Check('punch','edit') OR ($permission->Check('punch','edit_child') AND $is_child === TRUE) OR ($permission->Check('punch','edit_own') AND $is_owner === TRUE )))}
--- 125 ----
!                                                       {if ( $permission->Check('punch','add') AND ( $permission->Check('punch','edit') OR ($permission->Check('punch','edit_child') AND $is_child === TRUE) OR ($permission->Check('punch','edit_own') AND $permission->Check('punch','punch_in_out') AND $is_owner === TRUE )))}
Locked