def RetrieveSecret(self, volume_uuid):
    self.VerifyXsrfToken(base_settings.GET_PASSPHRASE_ACTION)

    if self.request.get('id'):
      try:
        entity = self.SECRET_MODEL.get(db.Key(self.request.get('id')))
      except datastore_errors.BadKeyError:
        raise models.AccessError('volume id is malformed')
    else:
      entity = self.SECRET_MODEL.GetLatestByUuid(volume_uuid)

    if not entity:
      raise models.AccessError('Volume not found: %s' % volume_uuid)

    user = models.GetCurrentUser()

    self.CheckRetrieveAuthorization(entity=entity, user=user)

    self.AUDIT_LOG_MODEL.Log(message='GET', entity=entity, request=self.request)

    # Send retrieval email if user is not retrieving their own secret.
    if entity.owner not in (user.user.email(), user.user.nickname()):
      self.SendRetrievalEmail(entity, user)

    escrow_secret = str(entity.secret).strip()
    if isinstance(entity, models.ProvisioningVolume):
      # We don't want to display barcodes for users retrieving provisioning
      # passwords as seeing the barcodes frightens and confuses them.
      escrow_barcode_svg = None
      qr_img_url = None
    else:
      escrow_barcode_svg = None
      if len(escrow_secret) <= 100:
        qr_img_url = (
            'https://chart.googleapis.com/chart?chs=245x245&cht=qr&chl='
            + cgi.escape(escrow_secret))
      else:
        qr_img_url = None

    if entity.ESCROW_TYPE_NAME == models.ProvisioningVolume.ESCROW_TYPE_NAME:
      recovery_str = 'Temporary password'
    else:
      recovery_str = '%s key' % entity.ESCROW_TYPE_NAME

    params = {
        'volume_type': self.SECRET_MODEL.ESCROW_TYPE_NAME,
        'volume_uuid': entity.volume_uuid,
        'qr_img_url': qr_img_url,
        'escrow_secret': escrow_secret,
        'checksum': entity.checksum,
        'recovery_str': recovery_str,
    }

    params[self.JSON_SECRET_NAME] = escrow_secret
    self.response.out.write(util.ToSafeJson(params))
A method to check whether the resource can use the quota method.
dataset/ETHPy150Open google/cauliflowervest/src/cauliflowervest/server/handlers/__init__.py/AccessHandler.RetrieveSecret--crossover with--dataset/ETHPy150Open openstack/nova/nova/quota.py/_valid_method_call_check_resources