[Rt-devel] CustomRights - SOLVED
Manuel ŞUBREDU
diablo at roedu.net
Tue Jun 26 03:31:40 EDT 2007
-----BEGIN PGP SIGNED MESSAGE-----
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};
}
1;
</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
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFGgMDcjGXbUSvc3AsRAsj1AJ4sTREHFB+zemS6QFT8XQrK0h0cNQCfaQ78
nYcyZ8Ef+gmZdFQ5ntKx7k4=
=XbCU
-----END PGP SIGNATURE-----
More information about the Rt-devel
mailing list