changelog_bot (changelog_bot) wrote in changelog,
changelog_bot
changelog_bot
changelog

[livejournal] r20862: LJSUP-10892 Extend availability of comme...

Committer: jirasup
LJSUP-10892 Extend availability of comments meta-data

U   trunk/htdocs/export_comments.bml
Modified: trunk/htdocs/export_comments.bml
===================================================================
--- trunk/htdocs/export_comments.bml	2011-12-26 10:56:58 UTC (rev 20861)
+++ trunk/htdocs/export_comments.bml	2011-12-26 11:13:47 UTC (rev 20862)
@@ -8,7 +8,9 @@
     return "<?needlogin?>" unless $remote;
 
     my $authas = $GET{'authas'} || $remote->{'user'};
-    my $u = LJ::get_authas_user($authas);
+    my $mode = $GET{get};
+    my $can_view = LJ::check_priv($remote, "siteadmin", "commentview") && ($mode ne 'comment_body');
+    my $u = $can_view ? LJ::load_user($authas) : LJ::get_authas_user($authas);
     return LJ::bad_input($ML{'error.invalidauth'}) unless $u;
 
     my @errors = ();
@@ -20,7 +22,7 @@
     push @errors, "This page can't be viewed except via POST."
         if BML::get_client_header('Referer') && !LJ::did_post();
 
-    my $mode = $GET{get};
+    #mode check
     push @errors, "Invalid mode."
         unless $mode =~ m/^comment_(?:meta|body)$/;
 

Tags: bml, changelog_bot, jirasup, livejournal
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