equal
deleted
inserted
replaced
108 except LogOut as ex: |
108 except LogOut as ex: |
109 # The actual 'logging out' logic should be in separated function |
109 # The actual 'logging out' logic should be in separated function |
110 # that is accessible by the pyramid views |
110 # that is accessible by the pyramid views |
111 headers = security.forget(request) |
111 headers = security.forget(request) |
112 raise HTTPSeeOther(ex.url, headers=headers) |
112 raise HTTPSeeOther(ex.url, headers=headers) |
113 # except AuthenticationError: |
113 except cubicweb.AuthenticationError: |
114 # XXX I don't think it makes sens to catch this ex here (cdevienne) |
114 # Will occur upon access to req.cnx which is a |
|
115 # cubicweb.dbapi._NeedAuthAccessMock. |
|
116 if not content: |
|
117 content = vreg['views'].main_template(req, 'login') |
|
118 request.response.body = content |
115 |
119 |
116 return request.response |
120 return request.response |
117 |
121 |
118 |
122 |
119 class TweenHandler(object): |
123 class TweenHandler(object): |