diff options
| author | Simon Lejeune <sle@openerp.com> | 2016-07-20 12:23:58 +0200 |
|---|---|---|
| committer | Simon Lejeune <sle@openerp.com> | 2016-07-20 14:16:01 +0200 |
| commit | d1cd293ecefde56bf649aa69b5da808755f6a4b8 (patch) | |
| tree | d5a133b37f617b5407e8c02025ca58e5bc1cf14d /addons/web_tour/static/src | |
| parent | 6ef1644a7b3812f4cc0d066ea74970791a4b4d54 (diff) | |
[FIX] web: session_info: introduce `is_superuser` key
This is done in order to enable the tour service only for the
superuser. Commit 6ef1644a7b3812 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 6ef1644a7b3812f4cc0d066ea74970791a4b4d54.
Diffstat (limited to 'addons/web_tour/static/src')
| -rw-r--r-- | addons/web_tour/static/src/js/tour_service.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/addons/web_tour/static/src/js/tour_service.js b/addons/web_tour/static/src/js/tour_service.js index c5fe6c786ef..8fd07845201 100644 --- a/addons/web_tour/static/src/js/tour_service.js +++ b/addons/web_tour/static/src/js/tour_service.js @@ -24,7 +24,7 @@ return session.is_bound.then(function () { // Load the list of consumed tours and the tip template only if we are admin, in the frontend, // tours being only available for the admin. For the backend, the list of consumed is directly // in the page source. - if (session.is_frontend && session.is_admin) { + if (session.is_frontend && session.is_superuser) { defs.push(new Model('web_tour.tour').call('get_consumed_tours')); defs.push(ajax.loadXML('/web_tour/static/src/xml/tip.xml', QWeb)); } @@ -61,11 +61,11 @@ return session.is_bound.then(function () { }; // Enable the MutationObserver for the admin or if a tour is running, when the DOM is ready - if (session.is_admin || tour.running_tour) { + if (session.is_superuser || tour.running_tour) { observe(); } // Override the TourManager so that it enables/disables the observer when necessary - if (!session.is_admin) { + if (!session.is_superuser) { var run = tour.run; tour.run = function () { run.apply(this, arguments); |
