com karma: Allow johannes and me to overwrite stuff: hooks/pre-receive

From: Date: Mon, 16 Dec 2013 10:19:31 +0000
Subject: com karma: Allow johannes and me to overwrite stuff: hooks/pre-receive
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-74452@lists.php.net to get a copy of this message
Commit: 5092625fc2c4bfb638ea99b5edf58ad47bf15c00 Author: David Soria Parra <dsp@php.net> Mon, 16 Dec 2013 02:19:31 -0800 Parents: 59d4cad5ef9f91e354e26a3582146279f83e2637 Branches: master Link: http://git.php.net/?p=karma.git;a=commitdiff;h=5092625fc2c4bfb638ea99b5edf58ad47bf15c00 Log: Allow johannes and me to overwrite stuff Changed paths: M hooks/pre-receive Diff: diff --git a/hooks/pre-receive b/hooks/pre-receive index 9dc6178..d98e297 100755 --- a/hooks/pre-receive +++ b/hooks/pre-receive @@ -23,6 +23,7 @@ include 'Git/PushInformation.php'; include 'Git/ReceiveHook.php'; include 'Git/PreReceiveHook.php'; +$weKnowWhatWeAreDoing = ['dsp', 'johannes']; $restrictedBranches = ['php-src.git' => ['refs/heads/PHP-5.4', 'refs/heads/PHP-5.3', 'refs/heads/PHP-5.5', 'refs/heads/PHP-5.6', 'refs/heads/master'], 'playground.git' => ['refs/heads/dsp']]; @@ -133,7 +134,7 @@ if (isset($restrictedBranches[$repo_name])) { }); } -if (count($restricted) > 0 && $pi->isForced() && $user != 'johannes') { +if (count($restricted) > 0 && $pi->isForced() && !in_array($user, $weKnowWhatWeAreDoing)) { deny("You are not allowed to overwrite commits on " . implode(', ', $restricted)); }

« previous php.cvs (#74452) next »