4Science / dspace-angular

Angular UI for DSpace and DSpace-CRIS. In the dspace-cris-7 branch you can find the extension to support DSpace-CRIS
BSD 3-Clause "New" or "Revised" License
13 stars 28 forks source link

incorrect handling of security policy configuration array values in edit / submission forms #46

Open saschaszott opened 11 months ago

saschaszott commented 11 months ago

The evaluation of the security policy configuration (configuration keys with prefix metadatavalue.visibility.) does not work as expected / as described in the DSpace CRIS 2023.01 documentation. This affects all edit forms as well as submission forms in DS CRIS 2023.01.

It does not affect the metadata administration (route ends with /edit/metadata).

Correct handling of the array value of metadatavalue.visibility.… in edit / submission forms

configuration value [0 1 2]

image

configuration value [0 1]

image

configuration value [0 2]

image

Incorrect handling of the array value of metadatavalue.visibility.… in edit / submission forms

configuration value [1]

No visibility switch shown in UI, but documentation (pg. 138) says “If only one value greater than 0 is defined, the choice proposed for this metadata security will be between level 0 and the level defined in configuration.” (which means that [1] should be equivalent to [0 1])

configuration value [2]

No visibility switch shown in UI, but documentation (pg. 138) says “If only one value greater than 0 is defined, the choice proposed for this metadata security will be between level 0 and the level defined in configuration.” (which means that [2] should be equivalent to [0 1 2])

configuration value [1 2]

is interpreted as [0 1 2] which is not correct

image