~ubuntu-branches/ubuntu/utopic/gitolite3/utopic

« back to all changes in this revision

Viewing changes to src/lib/Gitolite/Triggers/Writable.pm

  • Committer: Package Import Robot
  • Author(s): David Bremner
  • Date: 2013-05-18 17:59:21 UTC
  • Revision ID: package-import@ubuntu.com-20130518175921-ac4xe6vd0jtxvjot
Tags: upstream-3.5.1+4
ImportĀ upstreamĀ versionĀ 3.5.1+4

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
package Gitolite::Triggers::Writable;
 
2
 
 
3
use Gitolite::Rc;
 
4
use Gitolite::Common;
 
5
 
 
6
sub access_1 {
 
7
    my ( $repo, $aa, $result ) = @_[ 1, 3, 5 ];
 
8
    return if $aa eq 'R' or $result =~ /DENIED/;
 
9
 
 
10
    for my $f ( "$ENV{HOME}/.gitolite.down", "$rc{GL_REPO_BASE}/$repo.git/.gitolite.down" ) {
 
11
        next unless -f $f;
 
12
        _die slurp($f) if -s $f;
 
13
        _die "sorry, writes are currently disabled (no more info available)\n";
 
14
    }
 
15
}
 
16
 
 
17
1;