gitolite-down: disable write-access to take backups
(we quietly do not document the 'able' adc, which is now the most "official" adc in the sense that it has a new test, t64-write-able!) other notes: fix bug in 'able' (not setting $loc)
This commit is contained in:
parent
16ab95665c
commit
7313d48247
6 changed files with 204 additions and 19 deletions
|
@ -787,6 +787,16 @@ sub can_read {
|
|||
);
|
||||
}
|
||||
|
||||
# helper to manage "disabling" a repo or the whole site for "W" access
|
||||
sub check_repo_write_enabled {
|
||||
my ($repo) = shift;
|
||||
for my $d ("$ENV{HOME}/.gitolite.down", "$ENV{GL_REPO_BASE_ABS}/$repo.git/.gitolite.down") {
|
||||
next unless -f $d;
|
||||
die $ABRT . `cat $d` if -s $d;
|
||||
die $ABRT . "writes are currently disabled\n";
|
||||
}
|
||||
}
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
# setup the ~/.ssh/authorized_keys file
|
||||
# ----------------------------------------------------------------------------
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue