632 |
$c->detach('/admin/group'); |
$c->detach('/admin/group'); |
633 |
} |
} |
634 |
|
|
635 |
if ( ! $c->check_user_roles('Account Admins') and ! $c->check_user_roles('Group Admins')) { |
#FIXME I am sure that the code can be smaller and leaner |
636 |
|
@entries = $mesg_group->entries; |
637 |
|
@entries = $entries[0]->get_value('owner'); |
638 |
|
my $is_owner = grep { $_ eq $c->user->ldap_entry->dn } @entries; |
639 |
|
|
640 |
|
if ( ! $is_owner and ! $c->check_user_roles('Account Admins') and ! $c->check_user_roles('Group Admins')) { |
641 |
$c->forward('/user'); |
$c->forward('/user'); |
642 |
} |
} |
643 |
|
|