]> sipb.mit.edu Git - ikiwiki.git/blobdiff - IkiWiki/UserInfo.pm
web commit by EthanGlasserCamp: Oops, this is what the patch actually says!
[ikiwiki.git] / IkiWiki / UserInfo.pm
index fabe495bbe532821f507d6bdaf9342c70fb9ed3c..ae63d80235af328a8197775fdde3f75ec8ba31e2 100644 (file)
@@ -67,6 +67,24 @@ sub is_admin ($) { #{{{
        return grep { $_ eq $user_name } @{$config{adminuser}};
 } #}}}
 
+sub get_banned_users () { #{{{
+       my @ret;
+       my $userinfo=userinfo_retrieve();
+       foreach my $user (keys %{$userinfo}) {
+               push @ret, $user if $userinfo->{$user}->{banned};
+       }
+       return @ret;
+} #}}}
+
+sub set_banned_users (@) { #{{{
+       my %banned=map { $_ => 1 } @_;
+       my $userinfo=userinfo_retrieve();
+       foreach my $user (keys %{$userinfo}) {
+               $userinfo->{$user}->{banned} = $banned{$user};
+       }
+       return userinfo_store($userinfo);
+} #}}}
+
 sub commit_notify_list ($@) { #{{{
        my $committer=shift;
        
@@ -83,7 +101,7 @@ sub commit_notify_list ($@) { #{{{
                    length $userinfo->{$user}->{subscriptions} &&
                    exists $userinfo->{$user}->{email} &&
                    length $userinfo->{$user}->{email} &&
-                   grep { globlist_match($_, $userinfo->{$user}->{subscriptions}) } @pages) {
+                   grep { pagespec_match($_, $userinfo->{$user}->{subscriptions}) } @pages) {
                        push @ret, $userinfo->{$user}->{email};
                }
        }