lib/cocina/models/admin_policy.rb in cocina-models-0.14.0 vs lib/cocina/models/admin_policy.rb in cocina-models-0.15.0
- old
+ new
@@ -54,14 +54,19 @@
attribute :default_object_rights, Types::Strict::String.optional.default(DEFAULT_OBJECT_RIGHTS)
# which workflow to start when registering (used by Web Archive apos to start wasCrawlPreassemblyWF)
attribute :registration_workflow, Types::String.optional.default(nil)
+ # Allowing hasAdminPolicy to be omittable for now (until rolled out to consumers),
+ # but I think it's actually required for every Admin Policy
+ attribute :hasAdminPolicy, Types::Coercible::String.optional.default(nil)
+
def self.from_dynamic(dyn)
params = {
default_object_rights: dyn['default_object_rights'],
registration_workflow: dyn['registration_workflow']
}
+ params[:hasAdminPolicy] = dyn['hasAdminPolicy']
Administrative.new(params)
end
end
class Identification < Dry::Struct