<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Tampilkan Tiket Hanya untuk Anggota Departemen di osTicket v1.6 RC5</title>
	<atom:link href="http://www.openscriptsolution.com/2009/10/27/show-ticket-only-for-current-users-department-in-osticket-v1-6-rc5/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.openscriptsolution.com/id/2009/10/27/show-ticket-only-for-current-users-department-in-osticket-v1-6-rc5/</link>
	<description>... where solutions for script programming are found ...</description>
	<lastBuildDate>Wed, 08 Feb 2012 12:54:28 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Daniel</title>
		<link>http://www.openscriptsolution.com/id/2009/10/27/show-ticket-only-for-current-users-department-in-osticket-v1-6-rc5/comment-page-1/#comment-1317</link>
		<dc:creator>Daniel</dc:creator>
		<pubDate>Sat, 26 Jun 2010 16:30:17 +0000</pubDate>
		<guid isPermaLink="false">http://www.openscriptsolution.com/?p=712#comment-1317</guid>
		<description>Hi Masino, i have tested this mod and i have found a problem
When you log as Admin, and try to access any ticket, i you are not in the &quot;ticket group&quot;, you cant access it
I&#039;d rather admin has total access to tickcets so i suggest includding the condition 
&amp;&amp; (!$thisuser-&gt;isAdmin())  in your MOD
So it wold look like:
&lt;pre lang=&quot;php&quot; escaped=&quot;true&quot;&gt;
&lt; 0) {
    list($ticketID, $dept_id,$staff_id) = db_fetch_row($rselect);
    if (($dept_id!=$thisuser-&gt;getDeptId()) &amp;&amp; ($staff_id!=$thisuser-&gt;getId()) &amp;&amp; (!$thisuser-&gt;isAdmin()) ) { 
      $errors[&#039;err&#039;]=&#039;The ticket # &#039;.$ticketID.&#039; belongs to another department!&#039;;
    }
  }
}
&gt;&gt;
&lt;/pre&gt;</description>
		<content:encoded><![CDATA[<p>Hi Masino, i have tested this mod and i have found a problem<br />
When you log as Admin, and try to access any ticket, i you are not in the &#8220;ticket group&#8221;, you cant access it<br />
I&#8217;d rather admin has total access to tickcets so i suggest includding the condition<br />
&amp;&amp; (!$thisuser-&gt;isAdmin())  in your MOD<br />
So it wold look like:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #339933;">&lt;</span> <span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #990000;">list</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$ticketID</span><span style="color: #339933;">,</span> <span style="color: #000088;">$dept_id</span><span style="color: #339933;">,</span><span style="color: #000088;">$staff_id</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">=</span> db_fetch_row<span style="color: #009900;">&#40;</span><span style="color: #000088;">$rselect</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$dept_id</span><span style="color: #339933;">!=</span><span style="color: #000088;">$thisuser</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getDeptId</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">&amp;&amp;</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$staff_id</span><span style="color: #339933;">!=</span><span style="color: #000088;">$thisuser</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getId</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">&amp;&amp;</span> <span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span><span style="color: #000088;">$thisuser</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">isAdmin</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> 
      <span style="color: #000088;">$errors</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'err'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">=</span><span style="color: #0000ff;">'The ticket # '</span><span style="color: #339933;">.</span><span style="color: #000088;">$ticketID</span><span style="color: #339933;">.</span><span style="color: #0000ff;">' belongs to another department!'</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
  <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #339933;">&gt;&gt;</span></pre></div></div>

]]></content:encoded>
	</item>
</channel>
</rss>
