<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML xmlns="http://www.w3.org/TR/REC-html40" xmlns:v =
"urn:schemas-microsoft-com:vml" xmlns:o =
"urn:schemas-microsoft-com:office:office" xmlns:w =
"urn:schemas-microsoft-com:office:word"><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.2800.1491" name=GENERATOR><!--[if !mso]>
<STYLE>v\:* {
BEHAVIOR: url(#default#VML)
}
o\:* {
BEHAVIOR: url(#default#VML)
}
w\:* {
BEHAVIOR: url(#default#VML)
}
.shape {
BEHAVIOR: url(#default#VML)
}
</STYLE>
<![endif]-->
<STYLE>@font-face {
font-family: Tahoma;
}
@page Section1 {size: 595.3pt 841.9pt; margin: 1.0in 1.25in 1.0in 1.25in; }
P.MsoNormal {
FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman"
}
LI.MsoNormal {
FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman"
}
DIV.MsoNormal {
FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman"
}
A:link {
COLOR: blue; TEXT-DECORATION: underline
}
SPAN.MsoHyperlink {
COLOR: blue; TEXT-DECORATION: underline
}
A:visited {
COLOR: purple; TEXT-DECORATION: underline
}
SPAN.MsoHyperlinkFollowed {
COLOR: purple; TEXT-DECORATION: underline
}
P {
FONT-SIZE: 12pt; MARGIN-LEFT: 0in; MARGIN-RIGHT: 0in; FONT-FAMILY: "Times New Roman"; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto
}
SPAN.EmailStyle18 {
COLOR: navy; FONT-FAMILY: Arial; mso-style-type: personal-reply
}
DIV.Section1 {
page: Section1
}
</STYLE>
</HEAD>
<BODY lang=EN-AU vLink=purple link=blue>
<DIV dir=ltr align=left><SPAN class=933352122-30032005><FONT face=Arial
color=#0000ff size=2>Sounds good to me! Thanks.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=933352122-30032005><FONT face=Arial
color=#0000ff size=2>--Alex</FONT></SPAN></DIV>
<DIV> </DIV><!-- Converted from text/rtf format -->
<P><SPAN lang=en-us><FONT face="Courier New" size=2>Alex
Brelsfoard</FONT></SPAN> <BR><SPAN lang=en-us><FONT face="Courier New"
size=2>Web Applications Developer</FONT></SPAN> <BR><SPAN lang=en-us><FONT
face="Courier New" size=2>Web Development Office</FONT></SPAN> <BR><SPAN
lang=en-us><FONT face="Courier New" size=2>Worcester Polytechnic
Institute</FONT></SPAN> <BR><SPAN lang=en-us><FONT face="Courier New"
size=2>508-831-6147</FONT></SPAN> <BR><SPAN lang=en-us><FONT face="Courier New"
size=2>alexb@wpi.edu</FONT></SPAN> </P>
<DIV> </DIV><BR>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> Matthew Watson
[mailto:matthew.watson@staff.netspace.net.au] <BR><B>Sent:</B> Wednesday, March
30, 2005 5:12 PM<BR><B>To:</B> Brelsfoard, Alex;
rt-users@lists.bestpractical.com<BR><B>Subject:</B> RE: [rt-users] Displaying a
section based on access to a queue--Answer<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV class=Section1>
<P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">That’s a pretty messy
way of doing it, you are looping over all the queues but only doing any action
if the queue is “8” , it would be better to just load queue 8 and test on that.
Something like this,<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"><o:p> </o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">% my $q = new
RT::Queue($session{‘CurrentUser’});<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">%
$q->Load(‘8’);<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">% if ($q->Id
&& $q->CurrentUserHasRight(“SeeQueue”)){<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"><br><o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"> <&
/Element/MyElements &><o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"><br><o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">%
}<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"><o:p> </o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"><o:p> </o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">This should scale a lot
better as you get more queues.<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"><o:p> </o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">Matt.<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"><o:p> </o:p></SPAN></FONT></P>
<DIV
style="BORDER-RIGHT: medium none; PADDING-RIGHT: 0in; BORDER-TOP: medium none; PADDING-LEFT: 4pt; PADDING-BOTTOM: 0in; BORDER-LEFT: blue 1.5pt solid; PADDING-TOP: 0in; BORDER-BOTTOM: medium none">
<DIV>
<DIV class=MsoNormal style="TEXT-ALIGN: center" align=center><FONT
face="Times New Roman" size=3><SPAN lang=EN-US style="FONT-SIZE: 12pt">
<HR tabIndex=-1 align=center width="100%" SIZE=2>
</SPAN></FONT></DIV>
<P class=MsoNormal><B><FONT face=Tahoma size=2><SPAN lang=EN-US
style="FONT-WEIGHT: bold; FONT-SIZE: 10pt; FONT-FAMILY: Tahoma">From:</SPAN></FONT></B><FONT
face=Tahoma size=2><SPAN lang=EN-US
style="FONT-SIZE: 10pt; FONT-FAMILY: Tahoma">
rt-users-bounces@lists.bestpractical.com
[mailto:rt-users-bounces@lists.bestpractical.com] <B><SPAN
style="FONT-WEIGHT: bold">On Behalf Of </SPAN></B>Brelsfoard, Alex<BR><B><SPAN
style="FONT-WEIGHT: bold">Sent:</SPAN></B> Thursday, March 31, 2005 5:02
AM<BR><B><SPAN style="FONT-WEIGHT: bold">To:</SPAN></B>
rt-users@lists.bestpractical.com<BR><B><SPAN
style="FONT-WEIGHT: bold">Subject:</SPAN></B> RE: [rt-users] Displaying a
section based on access to a queue--Answer</SPAN></FONT><SPAN
lang=EN-US><o:p></o:p></SPAN></P></DIV>
<P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN
style="FONT-SIZE: 12pt"><o:p> </o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial color=blue size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: Arial">I played around long
enough and found a solution to this. I figured I'd share with
everyone:</SPAN></FONT><o:p></o:p></P>
<P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN
style="FONT-SIZE: 12pt"> <o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial color=blue size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: Arial">%my $q=new
RT::Queues($session{'CurrentUser'});<BR>%$q->UnLimit;<BR>%my $cansee =
0;<BR>%while (my $queue=$q->Next) {<BR>% if ($queue->id == 8)
{<BR>% if ($queue->CurrentUserHasRight('SeeQueue'))
{<BR>% $cansee =
1;<BR>% }<BR>% }<BR>%}<BR>%<BR>%if ($cansee)
{<BR><br><BR><& /Elements/MyElement
&><BR><br><BR>%}</SPAN></FONT><o:p></o:p></P>
<DIV>
<P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN
style="FONT-SIZE: 12pt"> <o:p></o:p></SPAN></FONT></P></DIV>
<DIV>
<P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN
style="FONT-SIZE: 12pt"> <o:p></o:p></SPAN></FONT></P></DIV>
<DIV>
<P class=MsoNormal><FONT face=Arial color=blue size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: Arial">--Alex</SPAN></FONT><o:p></o:p></P></DIV>
<P><FONT face="Courier New" size=2><SPAN lang=EN-US
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"><!-- Converted from text/rtf format -->Alex
Brelsfoard</SPAN></FONT> <BR><FONT face="Courier New" size=2><SPAN lang=EN-US
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">Web Applications
Developer</SPAN></FONT> <BR><FONT face="Courier New" size=2><SPAN lang=EN-US
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">Web Development
Office</SPAN></FONT> <BR><FONT face="Courier New" size=2><SPAN lang=EN-US
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">Worcester Polytechnic
Institute</SPAN></FONT> <BR><FONT face="Courier New" size=2><SPAN lang=EN-US
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">508-831-6147</SPAN></FONT>
<BR><FONT face="Courier New" size=2><SPAN lang=EN-US
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">alexb@wpi.edu</SPAN></FONT><SPAN
lang=EN-US> </SPAN><o:p></o:p></P>
<DIV>
<P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN
style="FONT-SIZE: 12pt"> <o:p></o:p></SPAN></FONT></P></DIV>
<P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN
style="FONT-SIZE: 12pt"><o:p> </o:p></SPAN></FONT></P>
<DIV class=MsoNormal style="TEXT-ALIGN: center" align=center><FONT
face="Times New Roman" size=3><SPAN lang=EN-US style="FONT-SIZE: 12pt">
<HR tabIndex=-1 align=center width="100%" SIZE=2>
</SPAN></FONT></DIV>
<P class=MsoNormal style="MARGIN-BOTTOM: 12pt"><B><FONT face=Tahoma size=2><SPAN
lang=EN-US
style="FONT-WEIGHT: bold; FONT-SIZE: 10pt; FONT-FAMILY: Tahoma">From:</SPAN></FONT></B><FONT
face=Tahoma size=2><SPAN lang=EN-US
style="FONT-SIZE: 10pt; FONT-FAMILY: Tahoma">
rt-users-bounces@lists.bestpractical.com
[mailto:rt-users-bounces@lists.bestpractical.com] <B><SPAN
style="FONT-WEIGHT: bold">On Behalf Of </SPAN></B>Brelsfoard, Alex<BR><B><SPAN
style="FONT-WEIGHT: bold">Sent:</SPAN></B> Wednesday, March 30, 2005 11:22
AM<BR><B><SPAN style="FONT-WEIGHT: bold">To:</SPAN></B>
rt-users@lists.bestpractical.com<BR><B><SPAN
style="FONT-WEIGHT: bold">Subject:</SPAN></B> [rt-users] Displaying a section
based on access to a queue</SPAN></FONT><SPAN lang=EN-US><o:p></o:p></SPAN></P>
<DIV>
<P class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">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.</SPAN></FONT><o:p></o:p></P></DIV>
<DIV>
<P class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Basically:</SPAN></FONT><o:p></o:p></P></DIV>
<DIV>
<P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN
style="FONT-SIZE: 12pt"> <o:p></o:p></SPAN></FONT></P></DIV>
<DIV>
<P class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">% if
($UserIsMemberOfGroup("MyGroup") {</SPAN></FONT><o:p></o:p></P></DIV>
<DIV>
<P class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><& /Elements/MyElement
&></SPAN></FONT><o:p></o:p></P></DIV>
<DIV>
<P class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">%
}</SPAN></FONT><o:p></o:p></P></DIV>
<DIV>
<P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN
style="FONT-SIZE: 12pt"> <o:p></o:p></SPAN></FONT></P></DIV>
<DIV>
<P class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Well, that's the general gist of
what I want. Any idea of what the proper syntax
is?</SPAN></FONT><o:p></o:p></P></DIV>
<DIV>
<P class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Thanks.</SPAN></FONT><o:p></o:p></P></DIV>
<DIV>
<P class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">--Alex</SPAN></FONT><o:p></o:p></P></DIV>
<DIV>
<P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN
style="FONT-SIZE: 12pt"> <o:p></o:p></SPAN></FONT></P></DIV>
<P><FONT face="Courier New" size=2><SPAN lang=EN-US
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"><!-- Converted from text/rtf format -->Alex
Brelsfoard</SPAN></FONT> <BR><FONT face="Courier New" size=2><SPAN lang=EN-US
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">Web Applications
Developer</SPAN></FONT> <BR><FONT face="Courier New" size=2><SPAN lang=EN-US
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">Web Development
Office</SPAN></FONT> <BR><FONT face="Courier New" size=2><SPAN lang=EN-US
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">Worcester Polytechnic
Institute</SPAN></FONT> <BR><FONT face="Courier New" size=2><SPAN lang=EN-US
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">508-831-6147</SPAN></FONT>
<BR><FONT face="Courier New" size=2><SPAN lang=EN-US
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">alexb@wpi.edu</SPAN></FONT><SPAN
lang=EN-US> </SPAN><o:p></o:p></P>
<DIV>
<P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN
style="FONT-SIZE: 12pt"> <o:p></o:p></SPAN></FONT></P></DIV></DIV></DIV><!--[object_id=#staff.netspace.net.au#]-->
<P align=left><FONT face=Arial size=1>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.</FONT></P></BODY></HTML>