Projet

Général

Profil

« Précédent | Suivant » 

Révision 64a0aa33

Ajouté par Thomas Noël il y a plus de 9 ans

handle user_login_callback (attributes, call cp_allow..)

Voir les différences:

usr/local/univnautes/sp/sp/settings.py
83 83
)
84 84

  
85 85
# Make this unique, and don't share it with anybody.
86
SECRET_KEY_FILENAME='/usr/local/univnautes/sp/secret.key'
86
SECRET_KEY_FILENAME = os.path.join(PROJECT_PATH, 'secret.key')
87 87
try:
88 88
    with open(SECRET_KEY_FILENAME, 'rb') as sk:
89 89
        SECRET_KEY = sk.read()
......
93 93
    with open(SECRET_KEY_FILENAME, 'wb') as sk:
94 94
        sk.write(SECRET_KEY)
95 95

  
96
# List of callables that know how to import templates from various sources.
96
# List of callables to import templates from various sources.
97 97
TEMPLATE_LOADERS = (
98 98
    'django.template.loaders.filesystem.Loader',
99 99
    'django.template.loaders.app_directories.Loader',
......
113 113
# Python dotted path to the WSGI application used by Django's runserver.
114 114
WSGI_APPLICATION = 'sp.wsgi.application'
115 115

  
116
TEMPLATE_DIRS = (
117
    os.path.join(PROJECT_PATH, 'sp', 'templates'),
118
)
116
#TEMPLATE_DIRS = (
117
#    os.path.join(PROJECT_PATH, 'sp', 'templates'),
118
#)
119 119

  
120 120
INSTALLED_APPS = (
121 121
    'django.contrib.auth',
......
135 135
    INSTALLED_APPS += ('django.contrib.admin',)
136 136

  
137 137
SESSION_SERIALIZER = 'django.contrib.sessions.serializers.PickleSerializer'
138
# can't be 'django.contrib.sessions.serializers.JSONSerializer' with authentic2
138
# it can't be 'django.contrib.sessions.serializers.JSONSerializer' with authentic2 (attributes)
139 139

  
140 140
SESSION_COOKIE_NAME = 'univnautes-sp-sessionid'
141 141
SESSION_ENGINE = 'django.contrib.sessions.backends.file'
......
182 182
        'authentic2.authsaml2.backends.AuthSAML2PersistentBackend',
183 183
        'authentic2.authsaml2.backends.AuthSAML2TransientBackend')
184 184

  
185
# pfSense captive portal commands :
186
UNIVNAUTES_CP_ALLOW_CMD = [
187
        os.path.join(PROJECT_PATH, 'sp', 'cp_allow'),
188
        'ip=%(ip)s',
189
        'username=%(username)s',
190
        'nameid=%(nameid)s',
191
        'multiple=%(multiple)s']
185 192

  
186
# get some values from config.xml
193
# now get some values from config.xml
187 194
# => server must be restarted if config.xml is changed
188 195

  
189 196
if 'CONFIG_XML' in os.environ:
......
206 213
    'sp.context_processors.sp',
207 214
    )
208 215

  
209
# FIXME: get this from SP_UI config
216
# FIXME: get this from SP_UI config (i.e. config.xml)
210 217
PROXYMAP_URL  = 'http://lactuca.entrouvert.org/proxymap/mapbox/%(z)d/%(x)d/%(y)d.png32'
211 218

  

Formats disponibles : Unified diff