All Versions
DSpace Documentation
Contribute to the DSpace Development Fund
The newly established DSpace Development Fund supports the development of new features prioritized by DSpace Governance. For a list of planned features see the fund wiki page.
Allows item submitters/editors to set visibility levels on individual metadata values. When set, a metadata value is only returned via REST/UI if the requesting user meets the required security level.
This mechanism is overridden by Hide Item Metadata Fields, so if you set metadata.hide.person.email = true, the configuration below will not work for the person.email metadata.
metadatavalue.visibility[.EntityType][.metadataField].settings = [level1 level2 ...]
1. Field-level: metadatavalue.visibility.Person.person.email.settings
2. Entity-level: metadatavalue.visibility.Person.settings
3. Global fallback: metadatavalue.visibility.settings
An empty [] means no security levels are offered (metadata follows standard visibility). A null/missing value falls through to the next level.
Defined in spring-dspace-security-metadata.xml:
| Level | Class | Meaning |
|---|---|---|
| 0 | MetadataPublicAccess | Visible to everyone (including Anonymous) |
| 1 | MetadataGroupBasedAccess | Visible only to members of the "Trusted" group |
| 2 | MetadataAdministratorAndOwnerAccess | Visible only to Admins or the entity owner |
The configured array defines which levels the submitter/editor can choose from, not the visibility itself. For example:
Inside metadata-security.cfg:
metadatavalue.visibility.settings = [0 1 2] metadatavalue.visibility.Person.settings = [0 1] metadatavalue.visibility.Person.dc.date.available.settings = [0 1]
To add custom levels:
Register the implementation in dspace/config/spring/api/spring-dspace-security-metadata.xml with a new level number:
<util:map id="securityLevelsMap"> <entry key="0" value-ref="level0Security"/> <entry key="1" value-ref="level1Security"/> <entry key="2" value-ref="level2Security"/> <entry key="3" value-ref="level3Security"/> <!-- your custom level --> </util:map> <bean id="level3Security" class="org.dspace.content.YourCustomSecurityAccess"/>