> > Something like this works for me:
> >
> > my $queue = RT::Queue->new($RT::SystemUser);
> > $queue->Load($queuename);
> >
> > foreach my $tmp_right (@group_rights) {
> > my ($status, $msg) = $group->PrincipalObj->GrantRight(
> > Right => $tmp_right,
> > Object => $queue);
> >
> > }
> >
>
> This didn't work.. What ever I try to do, I get: RT::Principal::GrandRight
> Unimplemented in main.
Have you tried getting the $group with something like this:
my $group = RT::Group->new($RT::SystemUser);
$group->LoadUserDefinedGroup($groupname);
if (! $group->id) {
die qq([ERROR] group "$groupname" not found\n);
}
BTW I've created groups with this:
my $newgrp = RT::Group->new($RT::SystemUser);
my ($status, $msg) = $newgrp->_Create( Name => $groupname,
Description => 'description here',
Domain => 'UserDefined',
Type => '', Instance => 0, );
-Jarno
--
Jarno Huuskonen
_______________________________________________
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users
Community help: http://wiki.bestpractical.com
Commercial support: [email protected]
2010 RT Training Sessions!
San Francisco, CA, USA - Feb 22 & 23
Dublin, Ireland - Mar 15 & 16
Boston, MA, USA - April 5 & 6
Washington DC, USA - Oct 25 & 26
Discover RT's hidden secrets with RT Essentials from O'Reilly Media.
Buy a copy at http://rtbook.bestpractical.com