[Rt-devel] CustomRights - SOLVED

Manuel ŞUBREDU diablo at roedu.net
Tue Jun 26 03:31:40 EDT 2007

Hash: SHA1

I needed a global custom right to be granted to invidual users (or
groups) so that they can see some custom statistics I have done.
 To add a new custom right (global) to RT 3.6.x you need to create in
/opt/rt3/lib/RT directory a file named System_Vendor.pm with the
following content:

<begin of code>
$CustomRights = {
  SeeCustomStats => 'See the custom statistics',

foreach my $custom_right ( keys %{ $CustomRights } ) {
  $RT::ACE::LOWERCASERIGHTNAMES{lc $custom_right} = $custom_right;
  $RIGHTS->{$custom_right} = $CustomRights->{$custom_right};

</end of code>

That code snippet will add a new right named SeeCustomStats to global
user and group rights . Ofc, more custom rights can be added.

 That code works for me ! I don't know if it will work on other version
of RT or if I broke something ;) At this moment all works as expected

Manuel ŞUBREDU wrote:
> Hi,
> I'm trying to develop a custom reports tool. Since I want to properly to
> the job, I need to add a custom right to RT, to be able to 'filter' the
> users who are allowed to see the reports.
>  I searched on the wiki and on the web, but I didn't find any reference
> on who to add custom rights to RT. Can someone please give me some
> pointers ?
List info: http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-devel

Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org


More information about the Rt-devel mailing list