|
Quotes |
" ... I want to tell you that your thyme product is functional and valuable beyond
words. I cannot imagine why any portal would be without it. It is the cornerstone of our new project ..."
" ... Thanks for such a complete project, its making my job much easier. ..."
" ... I have now deployed 4 different calendars and our users love them ... "
" ... Easy to install and use and a great look/design. ..."
" ... This has to be the easiest to use program I think I've had to deal with at all this year. ..."
|
|
| View previous topic :: View next topic |
| Author |
Message |
schnortz
Joined: 24 Mar 2008 Posts: 12
|
Posted: Fri Jul 18, 2008 3:33 pm Post subject: Display fields based on user - alt. question |
|
|
Ian...
I apologize if this should have gone in the original post, but I'm not sure if my question is directly related to the other individual's.
You refer there and in numerous posts to...
as a way to limit access to administrators. Therefore I ask.... who is being defined as an administrator?
My goal for new events / event edits / view event details was to only provided access to certain fields to calendar administrators and above. Through experimentation over the last couple of days, by using $_cal_user->admin I was able to allow access only to SUPER-USERS. However, If a NORMAL user was given ADMIN rights to a calendar, they were unable to access those fields. It did not seem to make a difference if they were part of a group or a separate entry in the calendar's Members list.
So my questions are (in my case... specifically for event_view_tpl & event_edit_tpl as both of these already have global ..., $_cal_user,...)
*Is $_cal_user->admin only for SUPER-USERS?
*If so, is there a way to give access to NORMAL users with ADMIN calendar rights?
*If not, who is included within $_cal_user->admin ? (If calendar ADMINs were included, what might I be forgetting or doing wrong?)
*You have also referred to $_cal_user->guest. Who falls in this category?
*Any other $_cal_user-> that might be useful to know?
Hopefully, your answers to this post will help clarify matters for myself and future 'thyme hackers'. Thanks in advance. |
|
| Back to top |
|
 |
esoft_ian
Joined: 12 Sep 2005 Posts: 5275
|
Posted: Mon Jul 21, 2008 4:14 pm Post subject: |
|
|
Hi,
$_cal_user->admin is only set if the current user is a super-user.
$_cal_user->guest is set if the current user is NOT logged in
You should be able to use:
if($_cal_user->access->can_admin($_cal_event->cal_obj)) {
.. user can admin the event's calendar
}
admin and guest are the only properties of $_cal_user that refer to access. |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|