compile: support "repo @all" definitions
"repo @all" can be used to set permissions or configurations for all already defined repos. (A repository is defined if it has permission rules associated, empty "repo" stanza or "@group=..." line is not enough.) For example to allow a backup user to clone all repos: # All other configuration [...] repo @all R = backup Signed-off-by: Teemu Matilainen <teemu.matilainen@reaktor.fi>
This commit is contained in:
parent
6f45f75ca1
commit
f37fb45144
|
@ -101,6 +101,13 @@ repo gitolite
|
|||
repo @oss_repos
|
||||
R = @all
|
||||
|
||||
# set permissions to all already defined repos
|
||||
# (a repository is defined if it has permission rules
|
||||
# associated, empty "repo" stanza or "@group=..." line is
|
||||
# not enough)
|
||||
repo @all
|
||||
RW+ = @admins
|
||||
|
||||
# ADVANCED PERMISSIONS USING REFEXES
|
||||
|
||||
# - refexes are specified in perl regex syntax
|
||||
|
|
|
@ -185,8 +185,12 @@ sub parse_conf_file
|
|||
{
|
||||
# grab the list and expand any @stuff in it
|
||||
@repos = split ' ', $1;
|
||||
if (@repos == 1 and $repos[0] eq '@all') {
|
||||
@repos = keys %repos;
|
||||
} else {
|
||||
@repos = expand_list ( @repos );
|
||||
}
|
||||
}
|
||||
# actual permission line
|
||||
elsif (/^(-|R|RW|RW\+) (.* )?= (.+)/)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue