660 """call the publish method of the application publisher, expecting to |
660 """call the publish method of the application publisher, expecting to |
661 get a Redirect exception |
661 get a Redirect exception |
662 """ |
662 """ |
663 return self.expect_redirect(lambda x: self.app_publish(x, path), req) |
663 return self.expect_redirect(lambda x: self.app_publish(x, path), req) |
664 |
664 |
665 def init_authentication(self, authmode, anonuser=None): |
665 def set_auth_mode(self, authmode, anonuser=None): |
666 self.set_option('auth-mode', authmode) |
666 self.set_option('auth-mode', authmode) |
667 self.set_option('anonymous-user', anonuser) |
667 self.set_option('anonymous-user', anonuser) |
668 if anonuser is None: |
668 if anonuser is None: |
669 self.config.anonymous_credential = None |
669 self.config.anonymous_credential = None |
670 else: |
670 else: |
671 self.config.anonymous_credential = (anonuser, anonuser) |
671 self.config.anonymous_credential = (anonuser, anonuser) |
|
672 |
|
673 def init_authentication(self, authmode, anonuser=None): |
|
674 self.set_auth_mode(authmode, anonuser) |
672 req = self.request() |
675 req = self.request() |
673 origsession = req.session |
676 origsession = req.session |
674 req.session = req.cnx = None |
677 req.session = req.cnx = None |
675 del req.execute # get back to class implementation |
678 del req.execute # get back to class implementation |
676 sh = self.app.session_handler |
679 sh = self.app.session_handler |