wildrepos: teach compile the new syntax
There's a new "C" permission to let someone *create* a repo that matches the pattern given in the "repo ..." line. If the word CREATER appears in the repo pattern, then that is forced to the actual user performing that operation. Something like this (we'll discuss READERS and WRITERS later): repo personal/CREATER/.+ C = @staff R [foo] = READERS RW [bar] = WRITERS ...various other permissions as usual... Delegation checking also changes quite a bit... see comments in code Implementation: there's also a sneaky little trick we're playing here with the dumped hash
This commit is contained in:
parent
8a4bb453a0
commit
77306567e9
2 changed files with 49 additions and 19 deletions
|
@ -27,6 +27,8 @@ $W_COMMANDS=qr/^git[ -]receive-pack$/;
|
|||
# note that REPONAME_PATT allows a "/" also, which USERNAME_PATT doesn't
|
||||
$REPONAME_PATT=qr(^\@?[0-9a-zA-Z][0-9a-zA-Z._/-]*$); # very simple pattern
|
||||
$USERNAME_PATT=qr(^\@?[0-9a-zA-Z][0-9a-zA-Z._-]*$); # very simple pattern
|
||||
# same as REPONAME, plus some common regex metas
|
||||
$REPOPATT_PATT=qr(^\@?[0-9a-zA-Z][\\^.$|()[\]*+?{}0-9a-zA-Z._/-]*$);
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
# convenience subs
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue