-
Notifications
You must be signed in to change notification settings - Fork 530
Metadata Security Settings on a Person's Email do not work when metadata.hide.person.email = true #5385
Description
Describe the bug
This issue was found during testing of #5145, the PR which adds these new metadata security settings.
While the settings work for Person's "Birth Date", they do NOT work for a Person's "Email"
The reason appears to be because we hide the email field (by default) in our dspace.cfg (for security reasons):
metadata.hide.person.email = true
To Reproduce
Steps to reproduce the behavior:
- Ensure you have the default settings of
metadata.hide.person.email = truespecified - Edit a Person entity (using the new Edit Form)
- Add an Email Address and a Birth Date. Change the security option to "public" (globe icon) for both
- Save the changes
- Logout to become anonymous
- Visit the Person page. Notice that, even though they have the same security settings, the Birth Date is visible, but the Email is NOT visible
Expected behavior
The current behavior is correct because metadata.hide.* configs should always override any metadata field specific security.
However, the user interface behavior is confusing to users because it appears they should be able to manage the security settings of this person.email metadata field.
To fix that, it seems like we have two main options:
- Either we remove the security options from the Email field by default, i.e. update the metadata-security.cfg to remove this setting
metadatavalue.visibility.Person.person.email.settings = [0 1] - Or, we do not display the security toggle whenever
metadata.hide.*is enabled for a given metadata field. This might be done on the backend if we ensuremetadata.hide.*settings cause similar settings inmetadata-security.cfgto be ignored.- For example, if
metadata.hide.person.email = trueis set, then that forcesmetadatavalue.visibility.Person.person.email.settings = [ ](even if some different value for that setting appears inmetadata-security.cfg.
- For example, if
I have a slight preference for the second option because it ensures any misconfiguration is automatically ignored. But, either approach could work.
Related work
This "Metadata Security Settings" feature was introduced in #5145.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Status