mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-02 11:49:10 +00:00
fix: Get accounting dimensions only if user has access
This commit is contained in:
@@ -65,6 +65,9 @@ $.extend(erpnext, {
|
|||||||
},
|
},
|
||||||
|
|
||||||
get_dimension_filters: async function() {
|
get_dimension_filters: async function() {
|
||||||
|
if (!frappe.boot.user.can_read.includes('Accounting Dimension')) {
|
||||||
|
return
|
||||||
|
}
|
||||||
let dimensions = await frappe.db.get_list('Accounting Dimension', {
|
let dimensions = await frappe.db.get_list('Accounting Dimension', {
|
||||||
fields: ['label', 'fieldname', 'document_type'],
|
fields: ['label', 'fieldname', 'document_type'],
|
||||||
filters: {
|
filters: {
|
||||||
|
|||||||
Reference in New Issue
Block a user