mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-03 04:09:11 +00:00
Merge pull request #18011 from surajshetty3416/fix-accounting-dimension-permission
fix: Get Accounting Dimension only if user has read permission on it
This commit is contained in:
@@ -65,6 +65,9 @@ $.extend(erpnext, {
|
|||||||
},
|
},
|
||||||
|
|
||||||
get_dimension_filters: async function() {
|
get_dimension_filters: async function() {
|
||||||
|
if (!frappe.model.can_read('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