def VerifyPermissions(
      self, required_permission, user=None, permission_type=None):
    # TODO(user): Consider making the method accept a list of checks
    #    to be performed, making CheckRetrieveAuthorization simpler.
    permission_type = permission_type or self.PERMISSION_TYPE

    if user is None:
      user = models.GetCurrentUser()

    VerifyPermissions(required_permission, user, permission_type)

    return user
Verifies a valid user is logged in.
dataset/ETHPy150Open google/cauliflowervest/src/cauliflowervest/server/handlers/__init__.py/AccessHandler.VerifyPermissions