Possible bug with Director privledge level

If you need support with TeamCal Pro (installation, configuration, usage) post your request here.
Post Reply
tunes4life
Fresh Boarder
Fresh Boarder
Posts: 3
Joined: 2009-02-21, 00:24

Possible bug with Director privledge level

Post by tunes4life » 2009-02-20, 19:35

Firstly, kick ass script. Clean, professional looking, easy to tweak.

I have a couple of "Director" users. These users can always see everyone's time. If they manage a group, they can see everyone and edit people in their groups time. However, I have several of these users that do not manage any groups. For instance, a secretary would want to be able to see who is in and not in. If I set a user to "Director" level, and add them as users to one of more groups, they can see everyone, but they can't edit there own calendar. A user should always be able to edit his/her own calendar right? The secretary would need to see who is in for messaging reasons and be able to add her days off to the calendar as well.

This is the only thing holding me up from being able to use the calendar. When Directors are made manager of any group they gain editing abilities for that group. If they aren't managers they should still have editing capability for themselves.

Is there any way that you could recommend to correct this problem? Thanks!
User avatar
George
Platinum Boarder
Platinum Boarder
Posts: 407
Joined: 2004-11-29, 21:20
Are you a spam bot?: No
Contact:

Re:Possible bug with Director privledge level

Post by George » 2009-02-25, 14:42

Hi tunes,

interesting issue. I will have to look into that in more detail. Originally the director was meant to not manage an own calendar in TeamCal. He is just viewing and might manage others.

I will get back to this...

George
TeamCal Neo is free for private use but requires licensing for use in a commercial environment:
https://georgelewe.atlassian.net/wiki/s ... eo+License
tunes4life
Fresh Boarder
Fresh Boarder
Posts: 3
Joined: 2009-02-21, 00:24

Re:Possible bug with Director privledge level

Post by tunes4life » 2009-02-26, 01:39

Interesting because when that user is made manager of a group he/she can edit their own. Any info would be greatly appreciated. Is it something that I could physically edit in the database to include?
User avatar
George
Platinum Boarder
Platinum Boarder
Posts: 407
Joined: 2004-11-29, 21:20
Are you a spam bot?: No
Contact:

Re:Possible bug with Director privledge level

Post by George » 2009-02-26, 02:24

Hi tunes,

for you to try a quick change of the directors authorities, go edit the file:

includes/functions.tcpro.php

In that file search for the function checkAuth(). If you're a little familiar with PHP you might be able to figure out a manual change that will help you in the short term.

Best regards,
George
TeamCal Neo is free for private use but requires licensing for use in a commercial environment:
https://georgelewe.atlassian.net/wiki/s ... eo+License
tunes4life
Fresh Boarder
Fresh Boarder
Posts: 3
Joined: 2009-02-21, 00:24

Re:Possible bug with Director privledge level

Post by tunes4life » 2009-02-26, 19:57

K, I just wanted to make sure that this wasn't a bug.

I have changed the following:

includes/functions.tcpro.php Line 229

Originally:

case "edit_grp" :
case "edit_own" :
if ($user == $ofuser && !$UL->checkUserType($CONF['UTDIRECTOR']))
$result = true;
else {
if ($UG->isGroupManagerOfUser($user, $ofuser))
$result = true;
else
$result = false;
}
break;

Changed so Director can still edit his/her own:

case "edit_grp" :
if ($user == $ofuser && !$UL->checkUserType($CONF['UTDIRECTOR']))
$result = true;
else {
if ($UG->isGroupManagerOfUser($user, $ofuser))
$result = true;
else
$result = false;
}
break;
case "edit_own" :
if ($user == $ofuser)
$result = true;
else {
if ($UG->isGroupManagerOfUser($user, $ofuser))
$result = true;
else
$result = false;
}
break;


Seems to work fine for anyone else who is having the same problem. Thanks for your help.
User avatar
George
Platinum Boarder
Platinum Boarder
Posts: 407
Joined: 2004-11-29, 21:20
Are you a spam bot?: No
Contact:

Re:Possible bug with Director privledge level

Post by George » 2009-02-27, 01:02

Looks good to me on first glimpse...
TeamCal Neo is free for private use but requires licensing for use in a commercial environment:
https://georgelewe.atlassian.net/wiki/s ... eo+License
Post Reply