<pre>
Collections:
ManagedProperties:
- foo: {value: bar}
+ foo: {Value: bar}
</pre>
h4. Original owner UUID
<pre>
Collections:
ManagedProperties:
- responsible_person_uuid: {function: original_owner}
+ responsible_person_uuid: {Function: original_owner}
</pre>
h4. Protected properties
-If there's a need to prevent a non-admin user from modifying a specific property, even by its owner, the @protected@ attribute can be set to @true@, like so:
+If there's a need to prevent a non-admin user from modifying a specific property, even by its owner, the @Protected@ attribute can be set to @true@, like so:
<pre>
Collections:
ManagedProperties:
- responsible_person_uuid: {function: original_owner, protected: true}
+ sample_id: {Protected: true}
</pre>
-This property can be applied to any of the defined managed properties. If missing, it's assumed as being @false@ by default.
+This configuration won't assign a @sample_id@ property on collection creation, but if the user adds it to any collection, its value is protected from that point on.
+
+Another use case would be to protect properties that were automatically assigned by the system:
+
+<pre>
+Collections:
+ ManagedProperties:
+ responsible_person_uuid: {Function: original_owner, Protected: true}
+</pre>
+
+If missing, the @Protected@ attribute it’s assumed as being @false@ by default.
h3. Supporting example scripts
When enabling this feature, there may be pre-existing collections that won't have the managed properties just configured. The following script examples may be helpful to sync these older collections.
-For the following examples we assume that the @responsible_person_uuid@ property is set as @{function: original_owner, protected: true}@.
+For the following examples we assume that the @responsible_person_uuid@ property is set as @{Function: original_owner, Protected: true}@.
h4. List uuid/names of collections without @responsible_person_uuid@ property
This example can be useful to change responsibility from one user to another.
-Please note that the following code should run with admin privileges, assuming that the managed property is @protected@.
+Please note that the following code should run with admin privileges, assuming that the managed property is @Protected@.
{% codeblock as python %}
{% include 'admin_update_collection_property_py' %}