[IMP] anomymous: remove /public controller
bzr revid: chs@openerp.com-20120605124758-u7fsjdldwnc0y2on
This commit is contained in:
parent
4de3f2032e
commit
d38dcb8473
|
@ -1 +0,0 @@
|
|||
import controllers
|
|
@ -1 +0,0 @@
|
|||
import public
|
|
@ -1,19 +0,0 @@
|
|||
import werkzeug
|
||||
|
||||
from openerp.addons.web.common import http as oeweb
|
||||
#from openerp.addons.web.controllers.main import db_list
|
||||
|
||||
def db_list(r):
|
||||
return ['trunk_anonymous']
|
||||
|
||||
class PublicController(oeweb.Controller):
|
||||
_cp_path = '/public'
|
||||
|
||||
@oeweb.httprequest
|
||||
def index(self, req):
|
||||
dbs = db_list(req)
|
||||
if len(dbs) == 1:
|
||||
url = '/web/webclient/login?db=%s&login=anonymous&key=anonymous' % (dbs[0],)
|
||||
else:
|
||||
url = '/'
|
||||
return werkzeug.utils.redirect(url)
|
Loading…
Reference in New Issue