From bc72f7f3e6432c571bd2ffec965f88f57bfd62b7 Mon Sep 17 00:00:00 2001 From: yuri Date: Tue, 9 Feb 2016 16:18:09 +0200 Subject: [PATCH] record dachlet check access --- frontend/client/src/views/dashlets/abstract/record-list.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/frontend/client/src/views/dashlets/abstract/record-list.js b/frontend/client/src/views/dashlets/abstract/record-list.js index bdcd68ba03..fdc92decfa 100644 --- a/frontend/client/src/views/dashlets/abstract/record-list.js +++ b/frontend/client/src/views/dashlets/abstract/record-list.js @@ -56,11 +56,15 @@ Espo.define('views/dashlets/abstract/record-list', ['views/dashlets/abstract/bas Dep.prototype.init.call(this); }, + checkAccess: function () { + return this.getAcl().check(this.scope, 'read'); + }, + afterRender: function () { this.getCollectionFactory().create(this.scope, function (collection) { var searchManager = this.searchManager = new SearchManager(collection, 'list', null, this.getDateTime(), this.getOption('searchData')); - if (!this.getAcl().check(this.scope, 'read')) { + if (!this.checkAccess()) { this.$el.find('.list-container').html(this.translate('No Access')); return; }