From da629810ad129fbde879de8190b6bdb3511ec20e Mon Sep 17 00:00:00 2001 From: Suraj Shetty Date: Thu, 20 Jun 2019 17:20:19 +0530 Subject: [PATCH] fix: Get accounting dimensions only if user has access --- erpnext/public/js/utils.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/erpnext/public/js/utils.js b/erpnext/public/js/utils.js index f44fb0c1a67..86fa70d8ade 100755 --- a/erpnext/public/js/utils.js +++ b/erpnext/public/js/utils.js @@ -65,6 +65,9 @@ $.extend(erpnext, { }, get_dimension_filters: async function() { + if (!frappe.boot.user.can_read.includes('Accounting Dimension')) { + return + } let dimensions = await frappe.db.get_list('Accounting Dimension', { fields: ['label', 'fieldname', 'document_type'], filters: {