Hello Ben,

--Am 22. Mai 2008 18:39:12 +0200 schrieb Benjamin Weser <[EMAIL PROTECTED]>:

> $RT::Logger->info("User: ", $session{'CurrentUser'}->Name);
> my $groups = $session{'CurrentUser'}->UserObj->OwnGroups;
> $RT::Logger->info("Count: ", $groups->Count);
> while (my $group = $groups->Next){
>     $RT::Logger->info("test: ", $group->Name);
>     if ( $group->Name =~ /Members RMB/ ){
>         $RT::Logger->info("found: ", $group->Name);
>         $ticket_page_tabs->{_Ca} = { title => loc('RMB'),
>                                     path  => "Ticket/RMB.html?id=" . $id,
>                                   };
>     }
> }

I don't know why your code does not work, but I would do it other way 
round: load the group and look if currentuser is a member.

Without guarantee:

my $group = new RT::Group($session{'CurrentUser'});
$group->LoadUserDefinedGroup('Members RMB');
if ($group->HasMemberRecursively($session{'CurrentUser'})) {
        $ticket_page_tabs->{_Ca} = { title => loc('RMB'),
                                    path  => "Ticket/RMB.html?id=" . $id,
                                   };
}

Dirk.
-- 
Dr. Dirk Pape (eAS - Projektleitung Campus Management)
Freie Universitaet Berlin
Grunewaldstr. 34a, 12165 Berlin
Tel. +49 (30) 838 75143, Fax. +49 (30) 838 54654

_______________________________________________
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: [EMAIL PROTECTED]


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com

Reply via email to