code: def allow(self, act, obj=None):
          
          objc = obj.components if obj is not None else []
          try:
              return self.tree[act.components + objc] == 'allow'
          except KeyError:
              return False
docs: Determine where a given action on a given object is allowed.