[rt-users] how to check user group
Todd Chapman
rt at chaka.net
Mon Mar 22 14:10:25 EST 2004
Try this:
my $group = new RT::Group($RT::SystemUser);
$group->LoadUserDefinedGroup("MyGroup");
if ($group->HasMember($session{'CurrentUser'}->PrincipalObj) {
.
.
.
On Mon, Mar 22, 2004 at 01:39:40PM -0600, Daniel Wittenberg wrote:
> What's the proper way to initialize $self?
>
> Thanks,
> Dan
>
> On Mon, 2004-03-22 at 12:25, Todd Chapman wrote:
> > This should work:
> >
> >
> > my $group = new RT::Group($RT::SystemUser);
> > $group->LoadUserDefinedGroup("MyGroup");
> > if ($group->HasMember($self->CurrentUser->PrincipalObj) {
> > .
> > .
> > .
> >
> >
> >
> > On Mon, Mar 22, 2004 at 12:45:12PM -0600, Daniel Wittenberg wrote:
> > > I added a new element to the main page that shows how many calls each
> > > user has open/new, but I wanted to restrict it so only people in a
> > > certain group see that. What variables can I check to see if the
> > > current user belongs to that group? I've tried poking around the perl
> > > modules but couldn't find anything that looked right.
> > >
> > > Thanks,
> > > Dan
> > >
>
> _______________________________________________
> rt-users mailing list
> rt-users at lists.bestpractical.com
> http://lists.bestpractical.com/mailman/listinfo/rt-users
>
> Have you read the FAQ? The RT FAQ Manager lives at http://fsck.com/rtfm
More information about the rt-users
mailing list