web/application.py
changeset 8311 76a44a0d7f4b
parent 8272 18893bb969d2
child 8312 6c2119509fac
equal deleted inserted replaced
8310:87f2f18a77ef 8311:76a44a0d7f4b
   359                 ctrlid, rset = self.url_resolver.process(req, path)
   359                 ctrlid, rset = self.url_resolver.process(req, path)
   360                 try:
   360                 try:
   361                     controller = self.vreg['controllers'].select(ctrlid, req,
   361                     controller = self.vreg['controllers'].select(ctrlid, req,
   362                                                                  appli=self)
   362                                                                  appli=self)
   363                 except NoSelectableObject:
   363                 except NoSelectableObject:
   364                     if ctrlid == 'login':
       
   365                         raise Unauthorized(req._('log out first'))
       
   366                     raise Unauthorized(req._('not authorized'))
   364                     raise Unauthorized(req._('not authorized'))
   367                 req.update_search_state()
   365                 req.update_search_state()
   368                 result = controller.publish(rset=rset)
   366                 result = controller.publish(rset=rset)
   369                 if req.cnx:
   367                 if req.cnx:
   370                     # no req.cnx if anonymous aren't allowed and we are
   368                     # no req.cnx if anonymous aren't allowed and we are