Projet

Général

Profil

0001-handle-login-path-prefix-9885.patch

Josué Kouka, 09 février 2016 17:17

Télécharger (1,97 ko)

Voir les différences:

Subject: [PATCH] handle login path prefix (#9885)

 README                    |  4 ++++
 mandayejs/applications.py | 15 +++++++++++----
 2 files changed, 15 insertions(+), 4 deletions(-)
README
161 161
            'products': '/products/id',
162 162
        }
163 163

  
164
        # If you class inherits from another and
165
        # a SITE_LOGIN_PATH need to be set
166
        SITE_LOGIN_PATH_PREFIX = '/wonderland/'
167

  
164 168

  
165 169
About Statics
166 170
-------------
mandayejs/applications.py
66 66
                if not dct.get('SITE_FORM_SUBMIT_ELEMENT', None):
67 67
                    dct['SITE_FORM_SUBMIT_ELEMENT'] = 'input[type=submit], button'
68 68

  
69
        if dct.get('SITE_LOGIN_PATH_PREFIX', None):
70
            parent = bases[0]
71
            dct['SITE_LOGIN_PATH'] = os.path.join(dct['SITE_LOGIN_PATH_PREFIX'], parent.SITE_LOGIN_PATH.strip('/'))
69 72
        return super(AppSettingsMeta, cls).__new__(cls, name, bases, dct)
70 73

  
71 74

  
......
255 258
    SITE_FORM_SUBMIT_ELEMENT = '#INDEX_BT_LOGIN'
256 259

  
257 260

  
258
class ImuseTeacherMontpellier(Imuse):
259
    SITE_LOGIN_PATH = '/montpellier/extranet/login/ens_index_enseignant.php'
261
class ImuseTeacher(Imuse):
262
    SITE_LOGIN_PATH = '/extranet/login/ens_index_enseignant.php'
260 263

  
261 264

  
262
class ImuseFamilyMontpellier(Imuse):
263
    SITE_LOGIN_PATH = '/montpellier/extranet/login/usa_index_famille.php'
265
class ImuseFamily(Imuse):
266
    SITE_LOGIN_PATH = '/extranet/login/usa_index_famille.php'
264 267

  
265 268
    SITE_LOGOUT_LOCATOR = '#MENU_FAMILLE_QUITTER'
266 269

  
270
class ImuseFamilyMontpellier(ImuseFamily):
271
    SITE_LOGIN_PATH_PREFIX = '/montpellier/'
272

  
273

  
267
-