app/soc/logic/out_of_band.py
changeset 293 1edd01373e71
parent 111 f506a22f50db
child 303 4f1bb54ddae5
equal deleted inserted replaced
292:1cece5192e26 293:1edd01373e71
    42         set the HTTP status code for the response
    42         set the HTTP status code for the response
    43     """
    43     """
    44     self.message = message
    44     self.message = message
    45     self.response_args = response_args
    45     self.response_args = response_args
    46 
    46 
       
    47 
       
    48 class AccessViolationResponse(OutOfBandResponse):
       
    49   """"Out of band response when an access requirement was not met.
       
    50   """
       
    51 
       
    52   def __init__(self, response):
       
    53     """Constructor used to set response message \.
       
    54 
       
    55     Args:
       
    56       response: The response that should be returned to the user.
       
    57     """
       
    58 
       
    59     self._response = response
       
    60 
       
    61   def response(self):
       
    62     """Returns the response that was set in the constructor.
       
    63     """
       
    64 
       
    65     return self._response