Sha256: 5e1fa614ef65a32313783f0d9f065cdb7056c81bb7cf68bd7a6c1a8fdd285d1f

Contents?: true

Size: 286 Bytes

Versions: 45

Compression:

Stored size: 286 Bytes

Contents

# frozen_string_literal: true

module Renalware
  module HD
    class DNASessionPolicy < BasePolicy
      def destroy?
        edit?
      end

      def edit?
        return false unless record.persisted?

        user_is_super_admin? || !record.immutable?
      end
    end
  end
end

Version data entries

45 entries across 45 versions & 1 rubygems

Version Path
renalware-core-2.1.1 app/policies/renalware/hd/dna_session_policy.rb
renalware-core-2.1.0 app/policies/renalware/hd/dna_session_policy.rb
renalware-core-2.0.167 app/policies/renalware/hd/dna_session_policy.rb
renalware-core-2.0.166 app/policies/renalware/hd/dna_session_policy.rb
renalware-core-2.0.165 app/policies/renalware/hd/dna_session_policy.rb
renalware-core-2.0.164 app/policies/renalware/hd/dna_session_policy.rb
renalware-core-2.0.163 app/policies/renalware/hd/dna_session_policy.rb
renalware-core-2.0.162 app/policies/renalware/hd/dna_session_policy.rb
renalware-core-2.0.161 app/policies/renalware/hd/dna_session_policy.rb
renalware-core-2.0.160 app/policies/renalware/hd/dna_session_policy.rb
renalware-core-2.0.159 app/policies/renalware/hd/dna_session_policy.rb
renalware-core-2.0.158 app/policies/renalware/hd/dna_session_policy.rb
renalware-core-2.0.157 app/policies/renalware/hd/dna_session_policy.rb
renalware-core-2.0.156 app/policies/renalware/hd/dna_session_policy.rb
renalware-core-2.0.155 app/policies/renalware/hd/dna_session_policy.rb
renalware-core-2.0.153 app/policies/renalware/hd/dna_session_policy.rb
renalware-core-2.0.152 app/policies/renalware/hd/dna_session_policy.rb
renalware-core-2.0.151 app/policies/renalware/hd/dna_session_policy.rb
renalware-core-2.0.149 app/policies/renalware/hd/dna_session_policy.rb
renalware-core-2.0.148 app/policies/renalware/hd/dna_session_policy.rb