[Rt-devel] API and Rights

Paddy Newman paddy.newman at db.com
Mon Oct 30 11:34:41 EST 2006


I'm using rt-3.6.1 after a migration from rt-3.0.9. Database is MySQL 
Given an RT::Group object and an RT::Queue object, what is the simplest 
way to grant a right such as "AdminQueue" to the group?

I've been trying the following without any joy:

my $rt_group = RT::Group->new(RT::SystemUser);
my $rt_queue = RT::Queue->new(RT::SystemUser);

$rt_group->LoadUserDefinedGroup("test admins");
$rt_queue->Load("test queue");

my $principal = $rt_group->PrincipalObj;

$principal->GrantRight(Right => "AdminQueue", Object => $rt_queue);

However, when I run that code I get the following message:
[Mon Oct 30 16:28:33 2006] [crit]: 1 (/opt/rt/lib/RT/ACE_Overlay.pm:907)
[Mon Oct 30 16:28:33 2006] [crit]: Can't load a principal for id 


Paddy Newman - t. +44(020)7545-4902 e. 54902


This e-mail may contain confidential and/or privileged information. If you 
are not the intended recipient (or have received this e-mail in error) 
please notify the sender immediately and destroy this e-mail. Any 
unauthorized copying, disclosure or distribution of the material in this 
e-mail is strictly forbidden.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.bestpractical.com/pipermail/rt-devel/attachments/20061030/219de8a4/attachment.htm

More information about the Rt-devel mailing list