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.0.127 app/policies/renalware/hd/dna_session_policy.rb
renalware-core-2.0.126 app/policies/renalware/hd/dna_session_policy.rb
renalware-core-2.0.125 app/policies/renalware/hd/dna_session_policy.rb
renalware-core-2.0.124 app/policies/renalware/hd/dna_session_policy.rb
renalware-core-2.0.123 app/policies/renalware/hd/dna_session_policy.rb