Remove extra_attr kwarg from RbacMalformedResponse
This patch set removes extra_attr kwarg from RbacMalformedResponse exception because it is unclear how unauthorized policy enforcement could result in an extra attribute being injected into a response body. For such an edge case to even be allowed, there would have to be a documented example of this. Besides, no test case even makes use of it, meaning that it is not something we should even support. Change-Id: I8f63720fe02d63360a7e40c836d55b56eb657156 Story: 2003843 Task: 26634
This commit is contained in:
parent
787fbd7254
commit
dcd153a2a0
|
@ -29,15 +29,11 @@ class RbacMalformedResponse(BasePatroleException):
|
|||
message = ("The response body is missing the expected %(attribute)s due "
|
||||
"to policy enforcement failure.")
|
||||
|
||||
def __init__(self, empty=False, extra_attr=False, **kwargs):
|
||||
def __init__(self, empty=False, **kwargs):
|
||||
if empty:
|
||||
self.message = ("The response body is empty due to policy "
|
||||
"enforcement failure.")
|
||||
kwargs = {}
|
||||
if extra_attr:
|
||||
self.message = ("The response body contained an unexpected "
|
||||
"attribute due to policy enforcement failure.")
|
||||
kwargs = {}
|
||||
super(RbacMalformedResponse, self).__init__(**kwargs)
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue