Sha256: 5765faa63c3376a0d53d2bb689254a6ff7064b68b31bfbd557a66654b6a7d5d0

Contents?: true

Size: 217 Bytes

Versions: 94

Compression:

Stored size: 217 Bytes

Contents

# frozen_string_literal: true

module Renalware
  class UserPolicy < BasePolicy
    def update?
      super && !user_update_self?
    end

    private

    def user_update_self?
      record == user
    end
  end
end

Version data entries

94 entries across 94 versions & 1 rubygems

Version Path
renalware-core-2.0.110 app/policies/renalware/user_policy.rb
renalware-core-2.0.109 app/policies/renalware/user_policy.rb
renalware-core-2.0.108 app/policies/renalware/user_policy.rb
renalware-core-2.0.106 app/policies/renalware/user_policy.rb
renalware-core-2.0.105 app/policies/renalware/user_policy.rb
renalware-core-2.0.104 app/policies/renalware/user_policy.rb
renalware-core-2.0.103 app/policies/renalware/user_policy.rb
renalware-core-2.0.102 app/policies/renalware/user_policy.rb
renalware-core-2.0.101 app/policies/renalware/user_policy.rb
renalware-core-2.0.100 app/policies/renalware/user_policy.rb
renalware-core-2.0.99 app/policies/renalware/user_policy.rb
renalware-core-2.0.98 app/policies/renalware/user_policy.rb
renalware-core-2.0.97 app/policies/renalware/user_policy.rb
renalware-core-2.0.96 app/policies/renalware/user_policy.rb
renalware-core-2.0.95 app/policies/renalware/user_policy.rb
renalware-core-2.0.94 app/policies/renalware/user_policy.rb
renalware-core-2.0.93 app/policies/renalware/user_policy.rb
renalware-core-2.0.92 app/policies/renalware/user_policy.rb
renalware-core-2.0.91 app/policies/renalware/user_policy.rb
renalware-core-2.0.90 app/policies/renalware/user_policy.rb