alf (red_alf) wrote in changelog,
alf
red_alf
changelog

[livejournal] r23133: LJSUP-13911: Limit availability of "frie...

Committer: afedorov
LJSUP-13911: Limit availability of "friend" admin console command

U   trunk/cgi-bin/LJ/Console/Command/Friend.pm
Modified: trunk/cgi-bin/LJ/Console/Command/Friend.pm
===================================================================
--- trunk/cgi-bin/LJ/Console/Command/Friend.pm	2012-10-15 09:10:45 UTC (rev 23132)
+++ trunk/cgi-bin/LJ/Console/Command/Friend.pm	2012-10-15 10:34:42 UTC (rev 23133)
@@ -19,7 +19,13 @@
 
 sub usage { '<command> <user> [ <group> ] [ <fgcolor> ] [ <bgcolor> ]' }
 
-sub can_execute { 1 }
+sub can_execute {
+    my $remote = LJ::get_remote();
+    return LJ::check_priv($remote, 'siteadmin') || 
+           LJ::check_priv($remote, 'supporthelp') ||
+           LJ::check_priv($remote, 'betatest', 'omega') ||
+           $LJ::IS_DEV_SERVER;
+}
 
 sub execute {
     my ($self, $command, $user, @args) = @_;

Tags: afedorov, livejournal, pm, red_alf
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