Page 1 of 1

Director should see remainders

Posted: 2012-11-20, 10:57
by Franz
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

Re: Director should see remainders

Posted: 2012-11-23, 17:32
by George
Hi Franz,
thanks for the mod. Good idea.

Re: Director should see remainders

Posted: 2012-11-26, 18:43
by George
Implemented in 3.4.002