equal
deleted
inserted
replaced
19 '''acl checker.''' |
19 '''acl checker.''' |
20 |
20 |
21 def __init__(self, ui, repo): |
21 def __init__(self, ui, repo): |
22 self.ui = ui |
22 self.ui = ui |
23 self.repo = repo |
23 self.repo = repo |
24 self.rules = ruleset.Ruleset.readfile(os.environ['HG_ACCESS_RULES_FILE']) |
24 |
|
25 self.rules = ruleset.rules_from_env() |
25 self.rules.set(user = os.environ['REMOTE_USER']) |
26 self.rules.set(user = os.environ['REMOTE_USER']) |
26 self.rules.set(repo = os.environ['HG_REPO_PATH']) |
27 self.rules.set(repo = os.environ['HG_REPO_PATH']) |
27 |
28 |
28 def allow(self, node): |
29 def allow(self, node): |
29 '''return if access allowed, raise exception if not.''' |
30 '''return if access allowed, raise exception if not.''' |