diff options
| author | Aaron Bohy <aab@odoo.com> | 2016-06-13 11:09:33 +0200 |
|---|---|---|
| committer | Aaron Bohy <aab@odoo.com> | 2016-06-16 14:59:39 +0200 |
| commit | e7256058f28e85fdc04c05d78e4897c442df7c10 (patch) | |
| tree | e9c8fce29d89c5ebff971ffeb01a65830f846668 /addons/web/static/src/js/widgets/debug_manager.js | |
| parent | 0abd35fbfbcd24bb3ec8994a58c32fc0feb3098f (diff) | |
[ADD] web: is_admin key of session_info into page source
Diffstat (limited to 'addons/web/static/src/js/widgets/debug_manager.js')
| -rw-r--r-- | addons/web/static/src/js/widgets/debug_manager.js | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/addons/web/static/src/js/widgets/debug_manager.js b/addons/web/static/src/js/widgets/debug_manager.js index 0106bf55626..f38c4a06656 100644 --- a/addons/web/static/src/js/widgets/debug_manager.js +++ b/addons/web/static/src/js/widgets/debug_manager.js @@ -66,17 +66,15 @@ var DebugManager = Widget.extend({ // whether group is currently enabled for current user this._has_features = false; // whether the current user is an administrator - this._is_admin = false; + this._is_admin = session.is_admin; return $.when( new Model('res.users').call('check_access_rights', {operation: 'write', raise_exception: false}), - this.session.user_has_group('base.group_no_one'), + session.user_has_group('base.group_no_one'), new Model('ir.model.data').call('xmlid_to_res_id', {xmlid: 'base.group_no_one'}), - this.session.user_has_group('base.group_system'), this._super() - ).then(function (can_write_user, has_group_no_one, group_no_one_id, is_admin) { + ).then(function (can_write_user, has_group_no_one, group_no_one_id) { this._features_group = can_write_user && group_no_one_id; this._has_features = has_group_no_one; - this._is_admin = is_admin; return this.update(); }.bind(this)); }, @@ -376,7 +374,7 @@ DebugManager.include({ nested: true, } }; - this.session.get_file({ + session.get_file({ url: '/web/report', data: {action: JSON.stringify(action)}, complete: framework.unblockUI |
