Page 1 of 1

Restrict updating metadata fields based on user profile

PostPosted:Wed Feb 02, 2022 7:30 am
by mamad
Hi guys
I'm using Openkm 6.3 CE
I want to grant read only access for metadata groups to some users based on their profile but i cant find any option for that in profile settings. Actually every one who can see the metadata group tab, can update all metadata fields but i want some users can only read those properties not to write them.
Is this possible at all ?
Thanks in advance

Re: Restrict updating metadata fields based on user profile

PostPosted:Sun Feb 06, 2022 8:22 am
by jllort
In the professional edition we have this feature implemented because in the metadata definition is possible to set security restrictions - https://docs.openkm.com/kcenter/view/ok ... ement.html - but unfortunately is not present in the CE.

To simulate the same behaviour in CE you should create your own Automation Action and link with set metadata group in PRE stage and then evaluate if the user can or not modify the metadata, in case can not modify raise and exception, that will block the metadata changes. I share some links you may be interested to implement the feature:
* https://docs.openkm.com/kcenter/view/ok ... ction.html
* https://docs.openkm.com/kcenter/view/ok ... utils.html
* https://docs.openkm.com/kcenter/view/ok ... olesByUser
* https://github.com/openkm/document-mana ... .java#L445 ( here should check what is saved in the "env" variable to get from your automation action )