https://rt-wiki.bestpractical.com/index.php?title=MoreAboutPrivilegedUsers&feed=atom&action=historyMoreAboutPrivilegedUsers - Revision history2024-03-29T07:54:52ZRevision history for this page on the wikiMediaWiki 1.37.2https://rt-wiki.bestpractical.com/index.php?title=MoreAboutPrivilegedUsers&diff=2252&oldid=prevAdmin: 2 revisions imported2016-04-06T20:15:43Z<p>2 revisions imported</p>
<p><b>New page</b></p><div>In 3.6.3 there is a block on the ticket display page that shows information about each requestor (new/open tickets, user comments, group membership). This information is only displayed for non-privileged users, though, and in my setup, 99% of the users are privileged.<br />
<br />
One simply fix is to edit html/Ticket/Elements/ShowRequestor and take out the little bit that restricts this to non-privileged users, changing this:<br />
<br />
next if $requestor-&gt;Privileged;<br />
<br />
<br />
into:<br />
<br />
%#next if $requestor-&gt;Privileged;<br />
<br />
<br />
But then any privileged user would see this information. That's not what I wanted, so I created a new Group Right ("ShowMoreAbout") and assigned it to just those users I wanted to have it. In order to create a new group right, edit the file local/lib/RT/Group_Local.pm, adding this code:<br />
<br />
use vars qw( $RIGHTS );<br />
<br />
$RIGHTS = {<br />
ShowMoreAbout =&gt; 'Show the "More about &lt;user&gt;" on ticket detail screen.',<br />
%$RIGHTS<br />
};<br />
<br />
foreach my $right ( keys %$RIGHTS ) {<br />
$RT::ACE::LOWERCASERIGHTNAMES{ lc $right } = $right;<br />
}<br />
<br />
<br />
(I forget where I picked this code up; it's not on the wiki, that I can see.) If you are creating this file for the first time, don't forget to add this at the top of the file:<br />
<br />
package RT::Group;<br />
<br />
use strict;<br />
no warnings qw(redefine);<br />
<br />
<br />
and this at the bottom:<br />
<br />
1;<br />
<br />
<br />
See [[CleanlyCustomizeRT]] for more info.<br />
<br />
After you've created the right, you can use it in ShowRequestor. Instead of commenting out the line above, change it:<br />
<br />
my $has_right_showmore = $session{'CurrentUser'}-&gt;HasRight(Object =&gt; $RT::System, Right =&gt; 'ShowMoreAbout');<br />
next if ((! $has_right_showmore) &amp;&amp; ($requestor-&gt;Privileged));<br />
<br />
<br />
Now, all privileged users will see the More About box for non-privileged users, but only people with the ShowMoreAbout right will see the More About box for privileged users.<br />
<br />
All of this was done on top of 3.6.3; I have not tested it with any other release. If you find any problems with it, let me know -- [[JoeCasadonte]]</div>Admin