From d1cd293ecefde56bf649aa69b5da808755f6a4b8 Mon Sep 17 00:00:00 2001 From: Simon Lejeune Date: Wed, 20 Jul 2016 12:23:58 +0200 Subject: [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. --- addons/web/static/src/js/web_client.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'addons/web/static/src/js/web_client.js') 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; -- cgit v1.2.3