Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Request Tracker: Devel

CustomRights

 

 

Request Tracker devel RSS feed   Index | Next | Previous | View Threaded


diablo at roedu

Jun 19, 2007, 3:08 AM

Post #1 of 2 (372 views)
Permalink
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-----
_______________________________________________
List info: http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-devel


diablo at roedu

Jun 26, 2007, 12:31 AM

Post #2 of 2 (339 views)
Permalink
Re: CustomRights - SOLVED [In reply to]

-----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-----
_______________________________________________
List info: http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-devel

Request Tracker devel RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact lists@gossamer-threads.com
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.