allow 'D' for @all repos
...so that the new semantics can be made system-default if someone wants to do that
This commit is contained in:
parent
967af2c993
commit
5aba13cd80
|
@ -387,6 +387,19 @@ This provides the *greatest* backward compatibility (if you don't specify any
|
||||||
`D` permissions, everything works just as before), while also enabling the new
|
`D` permissions, everything works just as before), while also enabling the new
|
||||||
semantics at the granularity of a repo, instead of the entire config.
|
semantics at the granularity of a repo, instead of the entire config.
|
||||||
|
|
||||||
|
Note 1: if you find that `RW+` no longer allows deletion but you can't see a
|
||||||
|
`D` permission in the rules, remember that gitolite allows a repo config to be
|
||||||
|
specified in multiple places for convenience, included delegated or included
|
||||||
|
files. Be sure to search everywhere :)
|
||||||
|
|
||||||
|
Note 2: a quick way to make this the default for *all* your repos is:
|
||||||
|
|
||||||
|
repo @all
|
||||||
|
D dummy-branch = foo
|
||||||
|
|
||||||
|
where foo can be either the administrator, or if you can ignore the warning
|
||||||
|
message when you push, a non-existant user.
|
||||||
|
|
||||||
[sdrr]: http://groups.google.com/group/gitolite/browse_thread/thread/9f2b4358ce406d4c#
|
[sdrr]: http://groups.google.com/group/gitolite/browse_thread/thread/9f2b4358ce406d4c#
|
||||||
|
|
||||||
#### file/dir NAME based restrictions
|
#### file/dir NAME based restrictions
|
||||||
|
|
|
@ -77,7 +77,7 @@ $perm = '+' if $oldsha ne $merge_base;
|
||||||
|
|
||||||
# were any 'D' perms specified? If they were, it means we have to separate
|
# were any 'D' perms specified? If they were, it means we have to separate
|
||||||
# deletes from rewinds, so if the new sha is all 0's, change the '+' to a 'D'
|
# deletes from rewinds, so if the new sha is all 0's, change the '+' to a 'D'
|
||||||
$perm = 'D' if $repos{$ENV{GL_REPO}}{DELETE_IS_D} and $newsha eq '0' x 40;
|
$perm = 'D' if ( $repos{$ENV{GL_REPO}}{DELETE_IS_D} or $repos{'@all'}{DELETE_IS_D} ) and $newsha eq '0' x 40;
|
||||||
|
|
||||||
my @allowed_refs;
|
my @allowed_refs;
|
||||||
# @all repos: see comments in similar code in check_access
|
# @all repos: see comments in similar code in check_access
|
||||||
|
|
Loading…
Reference in a new issue