parent
f73fd4e29b
commit
4110ba52a0
|
@ -2,6 +2,7 @@
|
|||
from urlparse import parse_qs
|
||||
|
||||
from mandaye.template import serve_template
|
||||
from mandaye.response import _302
|
||||
|
||||
class ArcopoleFilter:
|
||||
|
||||
|
@ -23,3 +24,12 @@ class ArcopoleFilter:
|
|||
return True
|
||||
return False
|
||||
|
||||
@staticmethod
|
||||
def local_logout(env, values, request, response):
|
||||
env['beaker.session'].delete()
|
||||
req_cookies = request.cookies
|
||||
for cookie in req_cookies.values():
|
||||
cookie['expires'] = 'Thu, 01 Jan 1970 00:00:01 GMT'
|
||||
cookie['path'] = '/studio'
|
||||
return _302(values['next_url'], req_cookies)
|
||||
|
||||
|
|
|
@ -71,7 +71,7 @@ mapping = [
|
|||
{
|
||||
'path': r'/studio/locallogout$',
|
||||
'method': 'GET',
|
||||
'response': {'auth': 'local_logout', 'values': {'next_url': '/studio/accueil'}}
|
||||
'response': {'filter': ArcopoleFilter.local_logout, 'values': {'next_url': '/studio/accueil'}}
|
||||
},
|
||||
{
|
||||
'path': r'/mandaye/slo$',
|
||||
|
|
|
@ -3,7 +3,7 @@ function mandaye_disassociate_logout(url, account, id)
|
|||
var r = confirm("Etes-vous sûr de vouloir délier le compte " + account + " ?");
|
||||
if (r == true)
|
||||
{
|
||||
window.location = url + "?id=" + id;
|
||||
window.location.href = url + "?id=" + id;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Reference in New Issue