[rt-users] Object permissions from the command line

Thomas Sibley trs at bestpractical.com
Mon Oct 15 16:56:48 EDT 2012


On 10/15/2012 01:47 PM, Glenn Hope wrote:
> I've recently been tasked with setting up an RT instance for a large
> organization, such that its queue structure mirrors that of their
> existing ticket system. I was able to use the command line interface to
> easily create the groups/queues, but I've stalled on setting up the
> permissions for the queues - with so many of them, it's going to take
> hours to click through the web interface. 
> 
> The permissions could easily be defined programmatically, but I haven't
> yet found a way to manipulate permissions outside of the web interface.
> In both the command line and the REST interface, I can view several
> properties of each queue, but nothing regarding user/group permissions
> to that queue. Is there a way to use either of the alternative
> interfaces to change permissions for objects, or will I need to do this
> by hand in the browser?

You can use the Perl API by calling GrantRight/RevokeRight on the
RT::Principals you want to grant rights to.  Arguments are the right
name and the target object on which the right should be granted (for
your case, likely a loaded RT::Queue or RT::System for global).

The doc for the Perl API is available by using perldoc on the RT source
lib files, or browsing online here: http://bestpractical.com/rt/docs/4.0/



More information about the rt-users mailing list