Committer: afedorov
LJSUP-13911: Limit availability of "friend" admin console commandU 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) = @_;