0006-misc-style-41949.patch
mellon/adapters.py | ||
---|---|---|
374 | 374 |
continue |
375 | 375 |
values = saml_attributes.get(saml_attribute) |
376 | 376 |
if not values: |
377 |
logger.warning('looking for user by saml attribute %r and user field %r, skipping because empty', |
|
378 |
saml_attribute, user_field) |
|
377 |
logger.warning( |
|
378 |
'looking for user by saml attribute %r and user field %r, skipping because empty', |
|
379 |
saml_attribute, user_field) |
|
379 | 380 |
continue |
380 | 381 |
ignore_case = line.get('ignore-case', False) |
381 | 382 |
for value in values: |
mellon/views.py | ||
---|---|---|
202 | 202 |
if error_url: |
203 | 203 |
error_url = resolve_url(error_url) |
204 | 204 |
next_url = error_url or self.get_next_url(default=resolve_url(settings.LOGIN_REDIRECT_URL)) |
205 |
return self.render(request, 'mellon/authentication_failed.html', |
|
206 |
{ |
|
207 |
'debug': settings.DEBUG, |
|
208 |
'reason': reason, |
|
209 |
'status_codes': status_codes, |
|
210 |
'issuer': login.remoteProviderId, |
|
211 |
'next_url': next_url, |
|
212 |
'relaystate': login.msgRelayState, |
|
213 |
'error_redirect_after_timeout': error_redirect_after_timeout, |
|
214 |
}) |
|
205 |
return self.render( |
|
206 |
request, 'mellon/authentication_failed.html', |
|
207 |
{ |
|
208 |
'debug': settings.DEBUG, |
|
209 |
'reason': reason, |
|
210 |
'status_codes': status_codes, |
|
211 |
'issuer': login.remoteProviderId, |
|
212 |
'next_url': next_url, |
|
213 |
'relaystate': login.msgRelayState, |
|
214 |
'error_redirect_after_timeout': error_redirect_after_timeout, |
|
215 |
}) |
|
215 | 216 | |
216 | 217 |
def sso_success(self, request, login): |
217 | 218 |
attributes = {} |
... | ... | |
281 | 282 |
'saml_attributes': attributes}) |
282 | 283 |
else: |
283 | 284 |
self.log.warning('no user found for NameID %r', attributes['name_id_content']) |
284 |
return self.render(request, 'mellon/user_not_found.html', {
|
|
285 |
'saml_attributes': attributes
|
|
286 |
})
|
|
285 |
return self.render( |
|
286 |
request, 'mellon/user_not_found.html',
|
|
287 |
{'saml_attributes': attributes})
|
|
287 | 288 |
request.session['lasso_session_dump'] = login.session.dump() |
288 | 289 | |
289 | 290 |
return HttpResponseRedirect(next_url) |
290 |
- |