Remove buggy, unused function get_leaders_from_usergroup
authorRemington Steed <rjs7@calvin.edu>
Fri, 7 Mar 2014 18:56:25 +0000 (13:56 -0500)
committerDan Wells <dbw2@calvin.edu>
Thu, 22 May 2014 13:55:54 +0000 (09:55 -0400)
Recent editing and testing of get_leaders_from_usergroup() uncovered an
unrelated bug which renders the function useless (it returns all group
members, not just the leader). It wasn't previously caught because
Evergreen has no apparent references to this function. This commit
removes the unused function.

Signed-off-by: Remington Steed <rjs7@calvin.edu>
Signed-off-by: Dan Wells <dbw2@calvin.edu>
Open-ILS/src/perlmods/lib/OpenILS/Application/Actor/UserGroups.pm

index 0a94956..4d6913f 100644 (file)
@@ -64,33 +64,6 @@ sub get_users_from_usergroup {
 
 
 __PACKAGE__->register_method(
 
 
 __PACKAGE__->register_method(
-    method => 'get_leaders_from_usergroup',
-    api_name    => 'open-ils.actor.usergroup.leaders.retrieve',
-    signature   => q/
-        Returns a list of ids for users that are leaders of the given usergroup
-    /
-);
-
-sub get_leaders_from_usergroup {
-    my( $self, $conn, $auth, $usergroup ) = @_;
-    my $e = new_editor(authtoken=>$auth);
-    return $e->event unless $e->checkauth;
-    return $e->event unless $e->allowed('VIEW_USER'); # XXX reley on editor perm
-    my $users = $e->search_actor_user(
-        {usrgroup => $usergroup, deleted => 'f'})
-        or return $e->event;
-
-    my @res;
-    for my $u (@$users) {
-        push( @res, $u->id ) if $u->master_account;
-    }
-
-    return \@res;
-}
-
-
-
-__PACKAGE__->register_method(
     method => 'get_address_members',
     api_name    => 'open-ils.actor.address.members',
     signature   => q/
     method => 'get_address_members',
     api_name    => 'open-ils.actor.address.members',
     signature   => q/