Sha256: 90375b97345ff0aa8267fade2447a8a48c09c961c6e55807b4277578269905dd

Contents?: true

Size: 525 Bytes

Versions: 27

Compression:

Stored size: 525 Bytes

Contents

require_dependency "renalware/messaging"

module Renalware
  module Modalities
    class DescriptionPolicy < BasePolicy
      # For safety we currently disallow the deletion of any ModalityDescription
      def destroy?
        false
      end

      # Its only possible to edit a ModalityDescription (e.g. to change its name) when it has no
      # (STI) type - ie its not a system-required ModalityDescription.
      def edit?
        record.type.nil?
      end

      def update?
        edit?
      end
    end
  end
end

Version data entries

27 entries across 27 versions & 1 rubygems

Version Path
renalware-core-2.0.8 app/policies/renalware/modalities/description_policy.rb
renalware-core-2.0.7 app/policies/renalware/modalities/description_policy.rb
renalware-core-2.0.5 app/policies/renalware/modalities/description_policy.rb
renalware-core-2.0.4 app/policies/renalware/modalities/description_policy.rb
renalware-core-2.0.3 app/policies/renalware/modalities/description_policy.rb
renalware-core-2.0.2 app/policies/renalware/modalities/description_policy.rb
renalware-core-2.0.1 app/policies/renalware/modalities/description_policy.rb
renalware-core-2.0.0 app/policies/renalware/modalities/description_policy.rb
renalware-core-2.0.0.pre.rc13 app/policies/renalware/modalities/description_policy.rb
renalware-core-2.0.0.pre.rc11 app/policies/renalware/modalities/description_policy.rb
renalware-core-2.0.0.pre.rc10 app/policies/renalware/modalities/description_policy.rb
renalware-core-2.0.0.pre.rc9 app/policies/renalware/modalities/description_policy.rb
renalware-core-2.0.0.pre.rc8 app/policies/renalware/modalities/description_policy.rb
renalware-core-2.0.0.pre.rc7 app/policies/renalware/modalities/description_policy.rb
renalware-core-2.0.0.pre.rc6 app/policies/renalware/modalities/description_policy.rb
renalware-core-2.0.0.pre.rc5 app/policies/renalware/modalities/description_policy.rb
renalware-core-2.0.0.pre.rc4 app/policies/renalware/modalities/description_policy.rb
renalware-core-2.0.0.pre.rc3 app/policies/renalware/modalities/description_policy.rb
renalware-core-2.0.0.pre.rc1 app/policies/renalware/modalities/description_policy.rb
renalware-core-2.0.0.pre.beta12 app/policies/renalware/modalities/description_policy.rb