[rt-users] Displaying a section based on access to a queue

Matthew Watson matthew.watson at staff.netspace.net.au
Wed Mar 30 17:02:47 EST 2005


Its kinda ugly, but the only way I found for testing if a user is in a
particular group (other than adding a method to the users overlay) is

 

 

 

% if ( ( $group->Id &&
$group->HasMember($session{'CurrentUser'}->PrincipalObj)) {

<& /Elements/MyElement &>

% }

 

<%INIT>

  my $group = RT::Group->new($session{CurrentUser});

  $group->LoadUserDefinedGroup('MyGroup');

</%INIT>

 

 

If you are going to be doing this frequently, it would probably be worth
adding it into the overlay.

 

Regards,
Matt.

 

________________________________

From: rt-users-bounces at lists.bestpractical.com
[mailto:rt-users-bounces at lists.bestpractical.com] On Behalf Of
Brelsfoard, Alex
Sent: Thursday, March 31, 2005 12:22 AM
To: rt-users at lists.bestpractical.com
Subject: [rt-users] Displaying a section based on access to a queue

 

I would like to have something displayed only if the person logged in
has access to a particular queue or is a member of a specific group.

Basically:

 

% if ($UserIsMemberOfGroup("MyGroup") {

<& /Elements/MyElement &>

% }

 

Well, that's the general gist of what I want.  Any idea of what the
proper syntax is?

Thanks.

--Alex

 

Alex Brelsfoard 
Web Applications Developer 
Web Development Office 
Worcester Polytechnic Institute 
508-831-6147 
alexb at wpi.edu 

 


This email and any files transmitted with it are confidential and intended solely for the 
use of the individual or entity to whom they are addressed. Please notify the sender 
immediately by email if you have received this email by mistake and delete this email 
from your system. Please note that any views or opinions presented in this email are solely
 those of the author and do not necessarily represent those of the organisation. 
Finally, the recipient should check this email and any attachments for the presence of 
viruses. The organisation accepts no liability for any damage caused by any virus 
transmitted by this email. 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20050331/68e3df62/attachment.htm>


More information about the rt-users mailing list