summaryrefslogtreecommitdiff
path: root/addons/web/static/src
diff options
context:
space:
mode:
authorSimon Lejeune <sle@openerp.com>2016-07-20 12:23:58 +0200
committerSimon Lejeune <sle@openerp.com>2016-07-20 14:16:01 +0200
commitd1cd293ecefde56bf649aa69b5da808755f6a4b8 (patch)
treed5a133b37f617b5407e8c02025ca58e5bc1cf14d /addons/web/static/src
parent6ef1644a7b3812f4cc0d066ea74970791a4b4d54 (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/static/src')
-rw-r--r--addons/web/static/src/js/web_client.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/web/static/src/js/web_client.js b/addons/web/static/src/js/web_client.js
index 99237dccc6c..5fc1f3f2796 100644
--- a/addons/web/static/src/js/web_client.js
+++ b/addons/web/static/src/js/web_client.js
@@ -62,7 +62,7 @@ return AbstractWebClient.extend({
var company = session.company_id;
var img = session.url('/web/binary/company_logo' + '?db=' + session.db + (company ? '&company=' + company : ''));
this.$('.oe_logo img').attr('src', '').attr('src', img);
- this.$('.oe_logo_edit').toggleClass('oe_logo_edit_admin', session.uid === 1);
+ this.$('.oe_logo_edit').toggleClass('oe_logo_edit_admin', session.is_superuser);
},
logo_edit: function(ev) {
var self = this;