We find that the best way for us to manage user rights is to create a number
of groups, assign global rights to the groups, and then assign users to the
appropriate group.
I’m trying to work out how to assign global rights to a group via a Perl
script, but I’m not having much luck. A simple case might look something
like this, I think:
#!/usr/bin/perl
use strict;
use warnings;
use lib “/usr/share/request-tracker4/lib”;
use RT;
RT::LoadConfig();
RT::Init();
use RT::Group;
use RT::User;
use RT::Principal;
my ($group, $status, $msg);
$group = RT::Group->new( $RT::SystemUser );
$group->LoadUserDefinedGroup( “Group2” );
die “couldn’t load group” unless $group->id;
print("SelfDescription : " . $group->SelfDescription() . “\n”);
$group->GrantRight(Object => , Right => “CreateTicket”);
This works up to and including the print. So the problem, of course, is
that the GrantRight call is obviously incomplete. I haven’t figured out
what the Object should be. And maybe there is some additional work to set
it up. Suggestions on where to get started to understand this?
Ken