equal
deleted
inserted
replaced
122 raise NotImplementedError() |
122 raise NotImplementedError() |
123 |
123 |
124 |
124 |
125 class AbstractAuthenticationManager(component.Component): |
125 class AbstractAuthenticationManager(component.Component): |
126 """authenticate user associated to a request and check session validity""" |
126 """authenticate user associated to a request and check session validity""" |
127 id = 'authmanager' |
127 __regid__ = 'authmanager' |
128 vreg = None # XXX necessary until property for deprecation warning is on appobject |
|
129 |
128 |
130 def __init__(self, vreg): |
129 def __init__(self, vreg): |
131 self.vreg = vreg |
130 self.vreg = vreg |
132 |
131 |
133 def validate_session(self, req, session): |
132 def validate_session(self, req, session): |
330 cnx.executed_queries = [] |
329 cnx.executed_queries = [] |
331 self._query_log.write('\n'.join(result).encode(req.encoding)) |
330 self._query_log.write('\n'.join(result).encode(req.encoding)) |
332 self._query_log.flush() |
331 self._query_log.flush() |
333 except Exception: |
332 except Exception: |
334 self.exception('error while logging queries') |
333 self.exception('error while logging queries') |
335 |
|
336 @deprecated("[3.4] use vreg['controllers'].select(...)") |
|
337 def select_controller(self, oid, req): |
|
338 try: |
|
339 return self.vreg['controllers'].select(oid, req=req, appli=self) |
|
340 except NoSelectableObject: |
|
341 raise Unauthorized(req._('not authorized')) |
|
342 |
334 |
343 def main_publish(self, path, req): |
335 def main_publish(self, path, req): |
344 """method called by the main publisher to process <path> |
336 """method called by the main publisher to process <path> |
345 |
337 |
346 should return a string containing the resulting page or raise a |
338 should return a string containing the resulting page or raise a |