web/views/basecontrollers.py
branchstable
changeset 5584 c1823448f81d
parent 5546 1bdaa9e1cd57
child 5590 a56eb02f9ce7
child 5626 c80e8aa1935e
equal deleted inserted replaced
5583:24125df012f3 5584:c1823448f81d
    29 from logilab.common.date import strptime
    29 from logilab.common.date import strptime
    30 
    30 
    31 from cubicweb import (NoSelectableObject, ObjectNotFound, ValidationError,
    31 from cubicweb import (NoSelectableObject, ObjectNotFound, ValidationError,
    32                       AuthenticationError, typed_eid)
    32                       AuthenticationError, typed_eid)
    33 from cubicweb.utils import CubicWebJsonEncoder
    33 from cubicweb.utils import CubicWebJsonEncoder
    34 from cubicweb.selectors import authenticated_user, match_form_params
    34 from cubicweb.selectors import authenticated_user, anonymous_user, match_form_params
    35 from cubicweb.mail import format_mail
    35 from cubicweb.mail import format_mail
    36 from cubicweb.web import Redirect, RemoteCallFailed, DirectResponse, json_dumps, json
    36 from cubicweb.web import Redirect, RemoteCallFailed, DirectResponse, json_dumps, json
    37 from cubicweb.web.controller import Controller
    37 from cubicweb.web.controller import Controller
    38 from cubicweb.web.views import vid_from_rset, formrenderers
    38 from cubicweb.web.views import vid_from_rset, formrenderers
    39 
    39 
    76     return wrapper
    76     return wrapper
    77 
    77 
    78 
    78 
    79 class LoginController(Controller):
    79 class LoginController(Controller):
    80     __regid__ = 'login'
    80     __regid__ = 'login'
       
    81     __select__ = anonymous_user()
    81 
    82 
    82     def publish(self, rset=None):
    83     def publish(self, rset=None):
    83         """log in the instance"""
    84         """log in the instance"""
    84         if self._cw.vreg.config['auth-mode'] == 'http':
    85         if self._cw.vreg.config['auth-mode'] == 'http':
    85             # HTTP authentication
    86             # HTTP authentication