From 237ef71ad05efbed5faab48c60f8b39fad80a1e1 Mon Sep 17 00:00:00 2001 From: Yuri Kuznetsov Date: Thu, 18 Aug 2022 12:23:59 +0300 Subject: [PATCH] record dashlet fields filter forbidden --- client/src/views/dashlets/fields/records/expanded-layout.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/client/src/views/dashlets/fields/records/expanded-layout.js b/client/src/views/dashlets/fields/records/expanded-layout.js index ac43ae6b5a..d01f8a9465 100644 --- a/client/src/views/dashlets/fields/records/expanded-layout.js +++ b/client/src/views/dashlets/fields/records/expanded-layout.js @@ -108,6 +108,8 @@ function (Dep, /** module:ui/multi-select*/MultiSelect) { let fields = this.getMetadata().get(['entityDefs', scope, 'fields']) || {}; + let forbiddenFieldList = this.getAcl().getScopeForbiddenFieldList(scope); + let fieldList = Object.keys(fields) .sort((v1, v2) => { return this.translate(v1, 'fields', scope) @@ -118,6 +120,10 @@ function (Dep, /** module:ui/multi-select*/MultiSelect) { return false; } + if (forbiddenFieldList.indexOf(item) !== -1) { + return false; + } + return true; });