diff options
| author | niv-openerp <nicolas.vanhoren@openerp.com> | 2013-07-10 16:54:51 +0200 |
|---|---|---|
| committer | niv-openerp <nicolas.vanhoren@openerp.com> | 2013-07-10 16:54:51 +0200 |
| commit | 57d18c1a346464500d8176c3ef3473e31f5fd118 (patch) | |
| tree | 529a0a44e3831ee325ab43057b5dd3f26a0fd32c /addons/web/http.py | |
| parent | 9e2c08219d29e0d621c2f55bdd671ada16b68176 (diff) | |
[IMP] In server-side web framework, change auth="db" to auth="admin", with some difference in semantic
bzr revid: nicolas.vanhoren@openerp.com-20130710145451-56ui50mga78eq10v
Diffstat (limited to 'addons/web/http.py')
| -rw-r--r-- | addons/web/http.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/addons/web/http.py b/addons/web/http.py index 8b49e8f9636..2f9016cf5cc 100644 --- a/addons/web/http.py +++ b/addons/web/http.py @@ -156,11 +156,11 @@ class WebRequest(object): if self.auth_method == "none": self.db = None self.uid = None - elif self.auth_method == "db": + elif self.auth_method == "admin": self.db = self.session._db or db_monodb() if not self.db: raise SessionExpiredException("No valid database for request %s" % self.httprequest) - self.uid = None + self.uid = openerp.SUPERUSER_ID else: # auth try: self.session.check_security() @@ -235,7 +235,7 @@ def route(route, type="http", auth="user"): authentication modules. """ assert type in ["http", "json"] - assert auth in ["user", "db", "none"] + assert auth in ["user", "admin", "none"] def decorator(f): if isinstance(route, list): f.routes = route |
