X-Git-Url: https://git.mdrn.pl/django-cas-provider.git/blobdiff_plain/8c6445fb4e57c6ca7f09c8d45b06abf30e775817..59b906fd2d60bd4a8712c23796a3ccfecbf5c5ad:/cas_provider/views.py?ds=inline diff --git a/cas_provider/views.py b/cas_provider/views.py index af36955..be6c4d4 100644 --- a/cas_provider/views.py +++ b/cas_provider/views.py @@ -169,7 +169,7 @@ def validate(request): username = ticket.user.username ticket.delete() - results = signals.on_cas_collect_histories.send(sender=validate, for_email=ticket.user.email) + results = signals.on_cas_collect_histories.send(sender=validate, for_user=ticket.user) histories = '\n'.join('\n'.join(rs) for rc, rs in results) logger.info('Validated %s %s', username, "(also %s)" % histories if histories else '') return HttpResponse("yes\n%s\n%s" % (username, histories)) @@ -337,9 +337,11 @@ def auth_success_response(user, pgt, proxies): username.text = user.username attrs = {} - for receiver, response in signals.cas_collect_custom_attributes.send(sender=auth_success_response, user=user): - if response: - attrs.update(response) + for receiver, custom in signals.cas_collect_custom_attributes.send(sender=auth_success_response, user=user): + if custom: + attrs.update(custom) + + attrs['identifiers'] = [i for r, i in signals.on_cas_collect_histories.send(sender=validate, for_user=user)] if attrs: formatter = get_callable(settings.CAS_CUSTOM_ATTRIBUTES_FORMATER)