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

« back to all changes in this revision

Viewing changes to src/lib/Gitolite/Triggers/AutoCreate.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::AutoCreate;
 
2
 
 
3
use strict;
 
4
use warnings;
 
5
 
 
6
# perl trigger set for stuff to do with auto-creating repos
 
7
# ----------------------------------------------------------------------
 
8
 
 
9
# to deny auto-create on read access, uncomment 'no-create-on-read' in the
 
10
# ENABLE list in the rc file
 
11
sub deny_R {
 
12
    die "autocreate denied\n" if $_[3] and $_[3] eq 'R';
 
13
    return;
 
14
}
 
15
 
 
16
# to deny auto-create on read *and* write, uncomment 'no-auto-create' in the
 
17
# ENABLE list in the rc file.  This means you can only create wild repos using
 
18
# the 'create' command, (which needs to be enabled in the ENABLE list).
 
19
sub deny_RW {
 
20
    die "autocreate denied\n" if $_[3] and ( $_[3] eq 'R' or $_[3] eq 'W' );
 
21
    return;
 
22
}
 
23
 
 
24
1;