Project

General

Profile

0001-Add-in-profile-template-context-a-dictionnary-of-fro.patch

Mikaël Ates, 24 Feb 2016 02:59 PM

Download (1.58 KB)

View differences:

Subject: [PATCH 1/1] Add in profile template context a dictionnary of frontend
 blocks (fixes #8843).

 src/authentic2/views.py | 3 +++
 1 file changed, 3 insertions(+)
src/authentic2/views.py
398 398
        # Credentials management
399 399
        blocks = [ frontend.profile(request, context_instance=context_instance) for frontend in frontends \
400 400
                if hasattr(frontend, 'profile') and frontend.enabled() ]
401
        blocks_by_id = { frontend.id(): frontend.profile(request, context_instance=context_instance)
402
                for frontend in frontends if hasattr(frontend, 'profile') and frontend.enabled() }
401 403
        idp_backends = utils.get_backends()
402 404
        # Get actions for federation management
403 405
        federation_management = []
......
407 409
                    federation_management.extend(idp_backend.federation_management(request))
408 410
        context_instance.update({
409 411
            'frontends_block': blocks,
412
            'frontends_block_by_id': blocks_by_id,
410 413
            'profile': profile,
411 414
            'allow_account_deletion': app_settings.A2_REGISTRATION_CAN_DELETE_ACCOUNT,
412 415
            'allow_profile_edit': EditProfile.can_edit_profile(),
413
-