Director should see remainders

If you have coded modifications, additions or language files for TeamCal Pro share it with others here.
Post Reply
Franz
Fresh Boarder
Fresh Boarder
Posts: 13
Joined: 2012-04-05, 16:34
Are you a spam bot?: No
Location: Dresden
Contact:

Director should see remainders

Post by Franz » 2012-11-20, 10:57

Hi,

to state the help:
A Directors account "is meant to be a viewing account from a directors point of view".
But currently a director can not see the remainders. With this little patch he can:


Index: includes/showmonth.function.php

Code: Select all

===================================================================
--- includes/showmonth.function.php     (Revision 133)
+++ includes/showmonth.function.php     (Arbeitskopie)
@@ -745,7 +745,9 @@
if ( $AC->checkOptions($CONF['A_CONFIDENTIAL']) ) $isConfidential = TRUE; else $isConfidential = FALSE;
if ( $U->username == $UL->username ) $isSameUser = TRUE; else $isSameUser = FALSE;
if ( $AC->checkOptions($CONF['A_SHOWREMAIN']) ) {
-   if ( checkAuth("editCalendar",$U->username) ) {
+      // if he can edit the calendar he is admin or manager therefore should see remainder
+      // or he is director
+      if ( checkAuth("editCalendar",$U->username) || $UL->checkUserType($CONF['UTDIRECTOR'])) {
         if ( $AL->findAllowance($U->username,$rowAC['cfgsym']) ) {
            $lastYearAllowance = $AL->lastyear;
            $thisYearAllowance = $AL->curryear;
Greetings,
Franz
User avatar
George
Platinum Boarder
Platinum Boarder
Posts: 382
Joined: 2004-11-29, 21:20
Are you a spam bot?: No
Contact:

Re: Director should see remainders

Post by George » 2012-11-23, 17:32

Hi Franz,
thanks for the mod. Good idea.
User avatar
George
Platinum Boarder
Platinum Boarder
Posts: 382
Joined: 2004-11-29, 21:20
Are you a spam bot?: No
Contact:

Re: Director should see remainders

Post by George » 2012-11-26, 18:43

Implemented in 3.4.002
Post Reply