[rt-users] Creating Group and giving Rights.
Hoogstraten, Ton
Ton.Hoogstraten at ingram.nl
Fri Jan 29 09:32:22 EST 2010
JJussi,
If I look at the code quickly I'd say you need $principal there you
defined with RT::Principal. Please correct me if I'm wrong.
Cheers,
Ton
-----Original Message-----
From: rt-users-bounces at lists.bestpractical.com
[mailto:rt-users-bounces at lists.bestpractical.com] On Behalf Of JJussi
Sent: Friday, January 29, 2010 12:16 PM
To: rt-users at lists.bestpractical.com
Subject: [rt-users] Creating Group and giving Rights.
Hi to list,
(I'm not very good Perl programmer, so this question may be (too)
simple)
I can create group easily:
my $group = new RT::Group($RT::SystemUser);
my $gid = $group->CreateUserDefinedGroup(
Name => $vars{nimi},
Description => $vars{kuvaus},
);
To give rights to that group I (try) to use:
my @gacl=('ShowTicket','CreateTicket','SeeQueue','ReplyToTicket');
my $principal = new RT::Principal($RT::SystemUser);
my $pid = $principal->Create(
PrincipalType => 'Group',
ObjectId => $gid,
Disabled => '0',
);
foreach (@gacl)
{
$xxx->GrandRight( Right => $_, Object => $gid);
}
That $xxx is problem.. I need Principal-Object there, but
CreateUserDefinedGroup returns GroupID. How I can get that Object?
--
JJussi
_______________________________________________
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users
Community help: http://wiki.bestpractical.com
Commercial support: sales at bestpractical.com
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
More information about the rt-users
mailing list