Commit Graph
10 Commits
Author SHA1 Message Date
Thibault Delavallée c8a313d51e [IMP] various: use odoo for imports instead of openerp and update class names 2016-08-10 15:48:07 +02:00
fwi-odoo 7d487c00a6 [IMP] web: remove void file, replace openerp tags, add license, clean imports 2016-08-03 13:42:00 +02:00
Simon Lejeune d1cd293ece [FIX] web: session_info: introduce is_superuser key
This is done in order to enable the tour service only for the
superuser. Commit 6ef1644a7b changed the meaning of `is_admin`
to achieve this but broke the fact that some features of the debug
manager are available to admin and not only to the superuser. Anyway
a `is_admin` key should mean that the user is in the admin group.

We could have checked client side that the uid is equal to 1 but
adding a `is_superuser` key is more elegant and easier to grep.
Also fix the only occurence of a uid check in the weblcient.

This reverts commit 6ef1644a7b.
2016-07-20 14:16:01 +02:00
Simon Lejeune 6ef1644a7b [FIX] web: session_info: is_admin check
The tour mechanism displays a tour if the `session.is_admin` key
is set to True. For this key to bet set to True, you need to be
in the system group.

Default options adds the system group to any created user, however as
there aren't any ir.model.access rule defined on the `web_tour.tour`
model, when you try to login as this created user, you get a traceback.

As the only way to reach a `web_tour.tour` record is to have the
superuser_id, update the `is_admin` condition accordingly.
2016-07-19 17:49:37 +02:00
Christophe Simonis 27987a54b4 [FIX] web: keep ir.http abstract 2016-07-04 13:48:18 +02:00
Aaron Bohy e7256058f2 [ADD] web: is_admin key of session_info into page source 2016-06-16 14:59:39 +02:00
Aaron Bohy d632679a72 [FIX] web: allow overriding webclient rendering context 2016-06-16 13:48:18 +02:00
Géry Debongnie f3fb0bfe29 [IMP] web_analytics: remove rpc to version_info
and put it serverside, in the session info.  This saves 1 rpc for every
connections.
2016-05-30 11:43:06 +02:00
Géry Debongnie fdb250942f [IMP] web: move currency rpc to session_info 2016-05-30 09:23:08 +02:00
Géry Debongnie 9c68bc7482 [REF] point_of_sale,web(site): move session info into page source
This commit introduces a mechanism to add information into the session
from a different module, without having to fetch it manually with a rpc.
This is intended to be used with small pieces of info required at the
start of the web client, such as currency informations.

To add information to the session, one can simply inherit from ir.http
and modify the session_info method.
2016-05-30 09:23:07 +02:00