1+ /**
2+ * The contents of this file are subject to the license and copyright
3+ * detailed in the LICENSE and NOTICE files at the root of the source
4+ * tree and available online at
5+ *
6+ * http://www.dspace.org/license/
7+ */
8+
19import {
210 autoserialize ,
311 deserialize ,
@@ -16,7 +24,15 @@ interface MetadataCustomSecurityEntries {
1624 [ metadata : string ] : number [ ] ;
1725}
1826/**
19- * A model class for a security configuration of metadata.
27+ * Model class representing the metadata security configuration associated with a given entity type.
28+ * This class is used to determine which security levels are applied
29+ * to metadata fields — either globally via a default, or on a per-field
30+ * basis via custom entries.
31+ *
32+ * Security levels are represented as integers:
33+ * - `0` → Public (visible to everyone)
34+ * - `1` → Registered users (visible to authenticated users only)
35+ * - `2` → Administrator (visible to administrators only)
2036 */
2137@typedObject
2238export class MetadataSecurityConfiguration extends CacheableObject {
@@ -29,17 +45,37 @@ export class MetadataSecurityConfiguration extends CacheableObject {
2945 @deserializeAs ( new IDToUUIDSerializer ( MetadataSecurityConfiguration . type . value ) , 'id' )
3046 uuid : string ;
3147 /**
32- * List of security configurations for all of the metadatas of the entity type
48+ * Array of security levels applied by default to all metadata fields
49+ * of the entity type, when no custom rule is defined for a specific field.
50+ *
51+ * Each element is an integer representing a security level
52+ * (0 = public, 1 = registered users, 2 = administrators).
53+ *
54+ * @example [0, 1]
3355 */
3456 @autoserialize
3557 metadataSecurityDefault : number [ ] ;
3658 /**
37- * List of security configurations for all of the metadatas of the entity type
59+ * Map of custom security configurations for individual metadata fields
60+ * of the entity type.
61+ *
62+ * Allows overriding the default behavior (`metadataSecurityDefault`)
63+ * for specific fields. The key is the qualified metadata field name
64+ * (e.g. `dc.title`), and the value is the array of security levels applied.
65+ *
66+ * @see MetadataCustomSecurityEntries
67+ *
68+ * @example
69+ * {
70+ * "dc.title": [0,1],
71+ * "dc.rights": [1,2]
72+ * }
3873 */
3974 @autoserialize
4075 metadataCustomSecurity : MetadataCustomSecurityEntries ;
4176 /**
42- * The object type
77+ * The REST resource type, automatically populated during
78+ * deserialization from the backend response.
4379 */
4480 @excludeFromEquals
4581 @autoserialize
0 commit comments