CustomRights

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

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 ?
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGd6sKjGXbUSvc3AsRAqUBAJ9o3o123/VSBDWiEZDLZEpjvYkpeACaA2kc
5Q/gqhx7nT7QLfQDkyEV6q4=
=L7TL
-----END PGP SIGNATURE-----

-----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:

$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 :wink: 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: The rt-devel Archives

-----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-----