Committer: gprochaev
LJSUP-7816. Moderator cannt Unscreen commentsU trunk/cgi-bin/LJ/S2/EntryPage.pm U trunk/cgi-bin/LJ/Talk.pm
Modified: trunk/cgi-bin/LJ/S2/EntryPage.pm =================================================================== --- trunk/cgi-bin/LJ/S2/EntryPage.pm 2011-01-31 05:39:19 UTC (rev 18143) +++ trunk/cgi-bin/LJ/S2/EntryPage.pm 2011-01-31 06:00:11 UTC (rev 18144) @@ -466,7 +466,7 @@ 'enabled' => $entry->comments_shown, 'locked' => !$entry->posting_comments_allowed, 'screened' => ($entry->prop("hasscreened") && $remote && - ($remote->{'user'} eq $u->{'user'} || $remote->can_manage($u))) ? 1 : 0, + ($remote->{'user'} eq $u->{'user'} || $remote->can_manage($u) || $remote->can_moderate($u))) ? 1 : 0, }); $comments->{show_postlink} = $entry->posting_comments_allowed; $comments->{show_readlink} = $entry->comments_shown && ($replycount || $comments->{'screened'}); Modified: trunk/cgi-bin/LJ/Talk.pm =================================================================== --- trunk/cgi-bin/LJ/Talk.pm 2011-01-31 05:39:19 UTC (rev 18143) +++ trunk/cgi-bin/LJ/Talk.pm 2011-01-31 06:00:11 UTC (rev 18144) @@ -353,6 +353,8 @@ } sub can_unscreen { +warn "Unscreen: " . $_[0]->{user}; +warn "CAN" if $_[0]->can_moderate($_[1]); return 0 if $_[0]->can_moderate($_[1]); return LJ::Talk::can_screen(@_); } @@ -1138,7 +1140,8 @@ $post->{'state'} eq "S" && ! ($remote && ($remote->{'userid'} == $u->{'userid'} || $remote->{'userid'} == $uposterid || $remote->{'userid'} == $post->{'posterid'} || - $remote->can_manage($u) )); + $remote->can_manage($u) || + $remote->can_moderate($u) )); } $post->{'_show'} = $should_show; $post_count += $should_show;