[rt-users] Assign Global Rights to Group?
Emmanuel Lacour
elacour at easter-eggs.com
Thu Jun 13 03:59:26 EDT 2013
On Wed, Jun 12, 2013 at 03:46:29PM -0500, Ken Johnson wrote:
> 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:
>
> $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.
use:
$group->PrincipalObj->GrantRight(Object => $RT::System, Right => "CreateTicket");
--
Easter-eggs Spécialiste GNU/Linux
44-46 rue de l'Ouest - 75014 Paris - France - Métro Gaité
Phone: +33 (0) 1 43 35 00 37 - Fax: +33 (0) 1 43 35 00 76
mailto:elacour at easter-eggs.com - http://www.easter-eggs.com
More information about the rt-users
mailing list