PortalParts.com Site

 Forum Index > Geeklog > Misc Projects New Topic Post Reply
 glEventManager Show Attendees Only to Admin Users
 |  Printable Version
muntada
 December 19 2007 20:53 PM (Read 1797 times)  
Forum Full Poster
Full Poster

Status: offline

Registered: 03/21/06
Posts: 17

How can I restrict the link Show Attendees to only Admin users? For the situation I am in, it would be a breach of privacy that regular users could see that.


 
Profile Email Website PM
Quote
muntada
 December 19 2007 21:08 PM  
Forum Full Poster
Full Poster

Status: offline

Registered: 03/21/06
Posts: 17

Okay, I hacked this one.

I changed:

PHP Formatted Code

                                $attendinglink = "<a href=\"{$_CONF['site_url']}/registration/index.php?op=list&eid=$eid\">[Show Attendees]</a>";
                                $cal_templates->set_var('attending_link',$attendinglink);
 


by adding a security check so that the end result was:

PHP Formatted Code

                        if (!empty($_USER['uid']) AND SEC_hasRights('registration.edit')) {
                                $attendinglink = "<a href=\"{$_CONF['site_url']}/registration/index.php?op=list&eid=$eid\">[Show Attendees]</a>";
                                $cal_templates->set_var('attending_link',$attendinglink);
                        }
 


 
Profile Email Website PM
Quote
Blaine
 December 19 2007 21:17 PM  
Forum Admin
Admin

Status: offline

Registered: 03/01/02
Posts: 3576

Looks good - thanks for posting your code.


Please consider contributing to support my efforts ..
 
Profile Email Website PM
Quote
Content generated in: 0.18 seconds
New Topic Post Reply



 All times are CDT. The time is now 02:11 AM.
Normal Topic Normal Topic
Locked Topic Locked Topic
Sticky Topic Sticky Topic
New Post New Post
Sticky Topic W/ New Post Sticky Topic W/ New Post
Locked Topic W/ New Post Locked Topic W/ New Post
View Anonymous Posts 
Anonymous users can post 
Filtered HTML Allowed 
Censored Content