Module: Ddr::Models::Governable
Instance Method Summary collapse
- #copy_admin_policy_from(other) ⇒ Object
- #inherited_license ⇒ Object
- #inherited_permissions ⇒ Object
- #inherited_rights ⇒ Object
Instance Method Details
#copy_admin_policy_from(other) ⇒ Object
34 35 36 37 38 39 40 41 42 43 44 |
# File 'lib/ddr/models/governable.rb', line 34 def copy_admin_policy_from(other) # XXX In active-fedora 7.0 can do # self.admin_policy = other.admin_policy self.admin_policy_id = case when other.has_admin_policy? other.admin_policy_id when other.is_a?(Collection) other.pid end # self.admin_policy_id = other.admin_policy_id if other.has_admin_policy? end |
#inherited_license ⇒ Object
30 31 32 |
# File 'lib/ddr/models/governable.rb', line 30 def inherited_license admin_policy.default_license if admin_policy end |
#inherited_permissions ⇒ Object
10 11 12 |
# File 'lib/ddr/models/governable.rb', line 10 def admin_policy ? admin_policy. : [] end |
#inherited_rights ⇒ Object
14 15 16 |
# File 'lib/ddr/models/governable.rb', line 14 def inherited_rights admin_policy.datastreams[Ddr::Datastreams::DEFAULT_RIGHTS] if admin_policy end |