Projet

Général

Profil

Télécharger (1,1 ko) Statistiques
| Branche: | Tag: | Révision:

univnautes / usr / local / univnautes / sp / sp / context_processors.py @ 64a0aa33

1
# -*- coding: utf-8 -*-
2
#
3
# UnivNautes
4
# Copyright (C) 2014  Entr'ouvert
5
#
6
# This program is free software: you can redistribute it and/or modify it under
7
# the terms of the GNU Affero General Public License as published by the Free
8
# Software Foundation, either version 3 of the License, or (at your option) any
9
# later version.
10
#
11
# This program is distributed in the hope that it will be useful, but WITHOUT
12
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
13
# FOR A PARTICULAR PURPOSE.  See the GNU Affero General Public License for more
14
# details.
15
#
16
# You should have received a copy of the GNU Affero General Public License
17
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
18

    
19
from django.conf import settings
20
from authentic2.saml.models import LibertyProvider
21

    
22
def sp(request):
23
    context_extras = {}
24
    context_extras.update(settings.SP_UI)
25
    context_extras['idps'] = LibertyProvider.objects.all()
26
    context_extras['pfsenseid'] = request.session.get('pfsenseid')
27
    context_extras['display_name'] = request.session.get('display_name')
28
    return context_extras
29

    
(3-3/8)