Show More
@@ -80,7 +80,7 class checker(object): | |||||
80 | self.user = getpass.getuser() |
|
80 | self.user = getpass.getuser() | |
81 | cfg = self.ui.config('acl', 'config') |
|
81 | cfg = self.ui.config('acl', 'config') | |
82 | if cfg: |
|
82 | if cfg: | |
83 |
self.ui.read |
|
83 | self.ui.readsections(cfg, 'acl.allow', 'acl.deny') | |
84 | self.allow, self.allowable = self.buildmatch('acl.allow') |
|
84 | self.allow, self.allowable = self.buildmatch('acl.allow') | |
85 | self.deny, self.deniable = self.buildmatch('acl.deny') |
|
85 | self.deny, self.deniable = self.buildmatch('acl.deny') | |
86 |
|
86 |
@@ -102,3 +102,8 echo '[acl.allow]' >> acl.config | |||||
102 | echo 'foo/** = betty' >> acl.config |
|
102 | echo 'foo/** = betty' >> acl.config | |
103 | do_push betty |
|
103 | do_push betty | |
104 |
|
104 | |||
|
105 | echo 'acl.config can set only [acl.allow]/[acl.deny]' | |||
|
106 | echo '[hooks]' >> acl.config | |||
|
107 | echo 'changegroup.acl = false' >> acl.config | |||
|
108 | do_push barney | |||
|
109 |
@@ -469,3 +469,49 rollback completed | |||||
469 | no rollback information available |
|
469 | no rollback information available | |
470 | 0:6675d58eff77 |
|
470 | 0:6675d58eff77 | |
471 |
|
471 | |||
|
472 | acl.config can set only [acl.allow]/[acl.deny] | |||
|
473 | Pushing as user barney | |||
|
474 | hgrc = """ | |||
|
475 | [hooks] | |||
|
476 | pretxnchangegroup.acl = python:hgext.acl.hook | |||
|
477 | [acl] | |||
|
478 | sources = push | |||
|
479 | [acl.allow] | |||
|
480 | foo/** = fred | |||
|
481 | [acl.deny] | |||
|
482 | foo/bar/** = fred | |||
|
483 | foo/Bar/** = fred | |||
|
484 | [acl.allow] | |||
|
485 | ** = barney | |||
|
486 | **/*.txt = wilma | |||
|
487 | [acl] | |||
|
488 | config = ../acl.config | |||
|
489 | """ | |||
|
490 | acl.config = """ | |||
|
491 | [acl.allow] | |||
|
492 | foo/** = betty | |||
|
493 | [hooks] | |||
|
494 | changegroup.acl = false | |||
|
495 | """ | |||
|
496 | pushing to ../b | |||
|
497 | searching for changes | |||
|
498 | common changesets up to 6675d58eff77 | |||
|
499 | adding changesets | |||
|
500 | add changeset ef1ea85a6374 | |||
|
501 | add changeset f9cafe1212c8 | |||
|
502 | add changeset 911600dab2ae | |||
|
503 | adding manifests | |||
|
504 | adding file changes | |||
|
505 | adding foo/Bar/file.txt revisions | |||
|
506 | adding foo/file.txt revisions | |||
|
507 | adding quux/file.py revisions | |||
|
508 | added 3 changesets with 3 changes to 3 files | |||
|
509 | calling hook pretxnchangegroup.acl: hgext.acl.hook | |||
|
510 | acl: acl.allow enabled, 1 entries for user barney | |||
|
511 | acl: acl.deny enabled, 0 entries for user barney | |||
|
512 | acl: allowing changeset ef1ea85a6374 | |||
|
513 | acl: allowing changeset f9cafe1212c8 | |||
|
514 | acl: allowing changeset 911600dab2ae | |||
|
515 | rolling back last transaction | |||
|
516 | 0:6675d58eff77 | |||
|
517 |
General Comments 0
You need to be logged in to leave comments.
Login now