def _CheckApprovalsForTokenWithoutReason(self, token, target):
    approval_root_urn = aff4.ROOT_URN.Add("ACL").Add(target.Path()).Add(
        token.username)

    try:
      cached_token = self.acl_cache.Get(approval_root_urn)
      stats.STATS.IncrementCounter("approval_searches",
                                   fields=["without_reason", "cache"])

      token.is_emergency = cached_token.is_emergency
      token.reason = cached_token.reason

      return True
    except __HOLE__:
      stats.STATS.IncrementCounter("approval_searches",
                                   fields=["without_reason", "data_store"])

      approved_token = aff4.Approval.GetApprovalForObject(target, token=token)
      token.reason = approved_token.reason
      token.is_emergency = approved_token.is_emergency

      self.acl_cache.Put(approval_root_urn, approved_token)

      return True
dataset/ETHPy150Open google/grr/grr/lib/aff4_objects/user_managers.py/FullAccessControlManager._CheckApprovalsForTokenWithoutReason