When using userprefence sentry rules to block access to more fieldsyou get an sentry exception when trying to save the entity

Status: Reported

Steps to Reproduce

When using userprefence sentry rules to block access to more fields you get an sentry exception when trying to save the entity, example::

Example:

prefsection: Rights-person-Existing

prefkey: udpersonsmall.double05

level: 4

owner_id: usergroup id

value: 0, No access

This works, it hides the field in CRM, but when a value is set in the field, the following error occurs on save:

 (which actually hides the sentry error)

If you do the same on contact level, you get the following error:

When the field is empty no error occurs.

Seems like the system is trying to save an field it does not have access to. Is there any other standard way to hide more fields for some usergroups, and make them editable for others?

 

Tested with the following field types: long, double, string

Tested on the following entity's: contact person

Versions tested: 8.5 R15, 9.1 SOD



https://community.superoffice.com/en/developer/forum/rooms/topic/netserver-api-group/core-components/setting-field-rights-using-userpreferences-hidding-field-gives-sentry-error-on-save/

 

Comments

[2020.10.27: a]

We created an workaround for this bug for our customer (field type int): in the webscript BeforeSaveContactEntity we set the value of the locked field to the database value (from UI comes Value=0), then the sentry check is not active.

Details
Issue id 9933
Registered 25 Jun 2020
Last modified 17 Feb 2021
Severity High
Area Sales
Status Reported
Target release
Type Bug