diff options
Diffstat (limited to 'lib/CatDap/Controller')
-rw-r--r-- | lib/CatDap/Controller/admin.pm | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/CatDap/Controller/admin.pm b/lib/CatDap/Controller/admin.pm index e8771e6..495a6a1 100644 --- a/lib/CatDap/Controller/admin.pm +++ b/lib/CatDap/Controller/admin.pm @@ -632,7 +632,12 @@ sub group_modify : Local { $c->detach('/admin/group'); } - 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 + @entries = $mesg_group->entries; + @entries = $entries[0]->get_value('owner'); + my $is_owner = grep { $_ eq $c->user->ldap_entry->dn } @entries; + + if ( ! $is_owner and ! $c->check_user_roles('Account Admins') and ! $c->check_user_roles('Group Admins')) { $c->forward('/user'); } |