[rt-users] Displaying a section based on access to a queue--Answer
Brelsfoard, Alex
alexb at WPI.EDU
Wed Mar 30 16:02:04 EST 2005
I played around long enough and found a solution to this. I figured I'd share
with everyone:
%my $q=new RT::Queues($session{'CurrentUser'});
%$q->UnLimit;
%my $cansee = 0;
%while (my $queue=$q->Next) {
% if ($queue->id == 8) {
% if ($queue->CurrentUserHasRight('SeeQueue')) {
% $cansee = 1;
% }
% }
%}
%
%if ($cansee) {
<br>
<& /Elements/MyElement &>
<br>
%}
--Alex
Alex Brelsfoard
Web Applications Developer
Web Development Office
Worcester Polytechnic Institute
508-831-6147
alexb at wpi.edu
________________________________
From: rt-users-bounces at lists.bestpractical.com
[mailto:rt-users-bounces at lists.bestpractical.com] On Behalf Of Brelsfoard,
Alex
Sent: Wednesday, March 30, 2005 11: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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20050330/4a12bde6/attachment.htm>
More information about the rt-users
mailing list