def eval(self, expression, **namespaces): """ Evaluate an ACL expression in the namespaces context. """ aclparser = ACLRuleParser(namespace=self.get_namespace(**namespaces)) return aclparser.eval(expression)
def eval(self, expression, **namespaces): """ Evaluate an ACL expression in the namespaces context. """ aclparser = ACLRuleParser( namespace=self.get_namespace(**namespaces)) return aclparser.eval(expression)
class ACLRule(Registry): _class_id = 'ACLRule' def __reginit__(self, name, rule): self.name = name self.rule = rule self.parser = ACLRuleParser() def eval(self, namespace): self.parser.namespace = namespace return self.parser.eval(self.rule)
def __reginit__(self, name, rule): self.name = name self.rule = rule self.parser = ACLRuleParser()