Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima <ldipentima@veritasgenetics.com>
- admin/spot-instances.html.textile.liquid
- Data Management:
- admin/collection-versioning.html.textile.liquid
- - admin/collection-default-properties.html.textile.liquid
+ - admin/collection-managed-properties.html.textile.liquid
- Other:
- admin/federation.html.textile.liquid
- admin/controlling-container-reuse.html.textile.liquid
+++ /dev/null
----
-layout: default
-navsection: admin
-title: Configuring collection's default properties
-...
-
-{% comment %}
-Copyright (C) The Arvados Authors. All rights reserved.
-
-SPDX-License-Identifier: CC-BY-SA-3.0
-{% endcomment %}
-
-Collection's default properties allow a cluster administrator to enable some special behaviors regarding properties at creation & update times.
-This page describes how to enable and configure these behaviors on the API server.
-
-h3. API Server configuration
-
-The @collection_default_properties@ setting is used for enabling any of the following behaviors:
-
-h4. Pre-assigned property key & value
-
-For every newly created collection, assign a predefined key/value pair if it isn't already passed at creation time:
-
-<pre>
-collection_default_properties:
- foo: {value: bar}
-</pre>
-
-h4. Original owner UUID
-
-This behavior will assign to a property key the UUID of the user who owns the collection's contaning project.
-
-<pre>
-collection_default_properties:
- responsible_person_uuid: {function: original_owner}
-</pre>
-
-h4. Protected properties
-
-If there's a need to avoid a non-admin user to modify a specific property, even by its owner, the @protected@ attribute can be set to true, like so:
-
-<pre>
-collection_default_properties:
- responsible_person_uuid: {function: original_owner, protected: true}
-</pre>
-
-This property can be applied to any of the defined default properties. If missing, it's assumed as being @false@ by default.
\ No newline at end of file
--- /dev/null
+---
+layout: default
+navsection: admin
+title: Configuring collection's managed properties
+...
+
+{% comment %}
+Copyright (C) The Arvados Authors. All rights reserved.
+
+SPDX-License-Identifier: CC-BY-SA-3.0
+{% endcomment %}
+
+Collection's managed properties allow a cluster administrator to enable some special behaviors regarding properties at creation & update times.
+This page describes how to enable and configure these behaviors on the API server.
+
+h3. API Server configuration
+
+The @Collections.ManagedProperties@ setting from the @config.yml@ file is used for enabling any of the following behaviors:
+
+h4. Pre-assigned property key & value
+
+For every newly created collection, assign a predefined key/value pair if it isn't already passed at creation time:
+
+<pre>
+Collections:
+ ManagedProperties:
+ foo: {value: bar}
+</pre>
+
+h4. Original owner UUID
+
+This behavior will assign to a property key the UUID of the user who owns the collection's contaning project.
+
+<pre>
+Collections:
+ ManagedProperties:
+ 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:
+
+<pre>
+Collections:
+ ManagedProperties:
+ responsible_person_uuid: {function: original_owner, 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.
\ No newline at end of file
# > 0 = auto-create a new version when older than the specified number of seconds.
PreserveVersionIfIdle: -1
- # Default collection properties. At creation time, if the client didn't
+ # Managed collection properties. At creation time, if the client didn't
# provide the listed keys, they will be automatically populated following
# one of the following behaviors:
#
# foo_bar: {value: baz, protected: false}
#
# If protected is true, only an admin user can modify its value.
- DefaultProperties: {}
+ ManagedProperties: {}
Login:
# These settings are provided by your OAuth2 provider (e.g.,
# > 0 = auto-create a new version when older than the specified number of seconds.
PreserveVersionIfIdle: -1
- # Default collection properties. At creation time, if the client didn't
+ # Managed collection properties. At creation time, if the client didn't
# provide the listed keys, they will be automatically populated following
# one of the following behaviors:
#
# foo_bar: {value: baz, protected: false}
#
# If protected is true, only an admin user can modify its value.
- DefaultProperties: {}
+ ManagedProperties: {}
Login:
# These settings are provided by your OAuth2 provider (e.g.,
# Sets default properties at creation time
def default_properties
- default_props = Rails.configuration.Collections.DefaultProperties.with_indifferent_access
+ default_props = Rails.configuration.Collections.ManagedProperties.with_indifferent_access
if default_props.empty?
return
end
end
def protected_default_properties_updates
- default_properties = Rails.configuration.Collections.DefaultProperties.with_indifferent_access
+ default_properties = Rails.configuration.Collections.ManagedProperties.with_indifferent_access
if default_properties.empty? || !properties_changed? || current_user.is_admin
return true
end
protected_props = default_properties.keys.select do |p|
- Rails.configuration.Collections.DefaultProperties[p]['protected']
+ Rails.configuration.Collections.ManagedProperties[p]['protected']
end
# Pre-existent protected properties can't be updated
invalid_updates = properties_was.keys.select{|p| properties_was[p] != properties[p]} & protected_props
arvcfg.declare_config "AuditLogs.MaxDeleteBatch", Integer, :max_audit_log_delete_batch
arvcfg.declare_config "AuditLogs.UnloggedAttributes", Array, :unlogged_attributes
arvcfg.declare_config "SystemLogs.MaxRequestLogParamsSize", Integer, :max_request_log_params_size
-arvcfg.declare_config "Collections.DefaultProperties", Hash, :collection_default_properties
arvcfg.declare_config "Collections.DefaultReplication", Integer, :default_collection_replication
arvcfg.declare_config "Collections.DefaultTrashLifetime", ActiveSupport::Duration, :default_trash_lifetime
arvcfg.declare_config "Collections.CollectionVersioning", Boolean, :collection_versioning
end
test "create collections with default properties" do
- Rails.configuration.Collections.DefaultProperties = {
+ Rails.configuration.Collections.ManagedProperties = {
'default_prop1' => {'value' => 'prop1_value'},
'responsible_person_uuid' => {'function' => 'original_owner'}
}
end
test "update collection with protected default properties" do
- Rails.configuration.Collections.DefaultProperties = {
+ Rails.configuration.Collections.ManagedProperties = {
'default_prop1' => {'value' => 'prop1_value', 'protected' => true},
}
act_as_user users(:active) do