diff --git a/conf/example.gitolite.rc b/conf/example.gitolite.rc index 4821596..d7b18d8 100644 --- a/conf/example.gitolite.rc +++ b/conf/example.gitolite.rc @@ -119,7 +119,6 @@ $GL_NO_DAEMON_NO_GITWEB = 0; $GL_GITCONFIG_KEYS = ""; -# # The second choice is to give it a space separated list of settings you # consider safe. (These are actually treated as a set of regular expression # patterns, and any one of them must match). For example: @@ -190,20 +189,6 @@ $SVNSERVE = ""; $GL_WILDREPOS = 0; -# -------------------------------------- -# ALLOW SETPERMS TO OVERRIDE gitolite.conf - -# A user can be given permissions to use a "wildcard created" repo using the -# "setperms" command run by the creator. However, if that same user is also -# explicitly listed in the config file as having a specific permission, and if -# that permission is different from what was specified using `setperms`, there -# is a conflict. - -# Default behaviour is to let the config file permissions override the -# "setperms" permissions, but if you want it the other way, set this to 1. - -$GL_SETPERMS_OVERRIDES_CONFIG = 0; - # -------------------------------------- # HOOK CHAINING diff --git a/src/gl-compile-conf b/src/gl-compile-conf index a6064ee..63a677c 100755 --- a/src/gl-compile-conf +++ b/src/gl-compile-conf @@ -52,7 +52,7 @@ $Data::Dumper::Sortkeys = 1; open STDOUT, ">", "/dev/null" if (@ARGV and shift eq '-q'); # these are set by the "rc" file -our ($GL_ADMINDIR, $GL_CONF, $GL_KEYDIR, $GL_CONF_COMPILED, $REPO_BASE, $REPO_UMASK, $PROJECTS_LIST, $GIT_PATH, $GL_WILDREPOS, $GL_GITCONFIG_KEYS, $GL_PACKAGE_HOOKS, $GL_SETPERMS_OVERRIDES_CONFIG, $GL_BIG_CONFIG, $GL_NO_DAEMON_NO_GITWEB); +our ($GL_ADMINDIR, $GL_CONF, $GL_KEYDIR, $GL_CONF_COMPILED, $REPO_BASE, $REPO_UMASK, $PROJECTS_LIST, $GIT_PATH, $GL_WILDREPOS, $GL_GITCONFIG_KEYS, $GL_PACKAGE_HOOKS, $GL_BIG_CONFIG, $GL_NO_DAEMON_NO_GITWEB); # and these are set by gitolite.pm our ($REPONAME_PATT, $REPOPATT_PATT, $USERNAME_PATT, $AUTH_COMMAND, $AUTH_OPTIONS, $ABRT, $WARN); @@ -227,8 +227,6 @@ sub parse_conf_file s/\bCREAT[EO]R\b/~\$creator/g for @users; s/\bREADERS\b/\$readers/g for @users; s/\bWRITERS\b/\$writers/g for @users; - # and double it up if $GL_SETPERMS_OVERRIDES_CONFIG - do { s/\$(creator|readers|writers)\b/~\$$1/g for @users } if $GL_SETPERMS_OVERRIDES_CONFIG; # ok, we can finally populate the %repos hash for my $repo (@repos) # each repo in the current stanza @@ -378,7 +376,7 @@ my $dumped_data = Data::Dumper->Dump([\%repos], [qw(*repos)]); # the dump uses single quotes, but we convert any strings containing $creator, # $readers, $writers, to double quoted strings. A wee bit sneaky, but not too # much... -$dumped_data =~ s/'(?=[^']*\$(?:creator|readers|writers|gl_user))~*(.*?)'/"$1"/g; +$dumped_data =~ s/'(?=[^']*\$(?:creator|readers|writers|gl_user))~?(.*?)'/"$1"/g; print $compiled_fh $dumped_data; print $compiled_fh Data::Dumper->Dump([\%groups], [qw(*groups)]) if $GL_BIG_CONFIG and %groups; close $compiled_fh or die "$ABRT close compiled-conf failed: $!\n";