Alexander Nazarov (nfokz) wrote in changelog,
Alexander Nazarov
nfokz
changelog

[livejournal] r23519: LJSV-2548: Not maintainer/owner of commu...

Committer: anazarov
LJSV-2548: Not maintainer/owner of community can create sticky post
U   trunk/cgi-bin/ljprotocol.pl
Modified: trunk/cgi-bin/ljprotocol.pl
===================================================================
--- trunk/cgi-bin/ljprotocol.pl	2013-01-09 12:40:00 UTC (rev 23518)
+++ trunk/cgi-bin/ljprotocol.pl	2013-01-09 12:52:25 UTC (rev 23519)
@@ -3171,6 +3171,13 @@
         return $res if $res->{type};
     }
 
+    if ( $req->{sticky} &&
+         $uowner->is_community() &&
+         !$u->can_manage($uowner) )
+    {
+        return fail($err, 158);
+    }
+
     # don't moderate admins, moderators, pre-approved users & unsuspicious users
     my $is_unsuspicious_user = 0;
     LJ::run_hook('is_unsuspicious_user_in_comm', $posterid, \$is_unsuspicious_user);

Tags: anazarov, livejournal, nfokz, pl
Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 0 comments