Sha256: a6aa3d1d94084a425fff6b22480e4e9b978fbb1c97c67366a5fb70a56cf2530e

Contents?: true

Size: 186 Bytes

Versions: 28

Compression:

Stored size: 186 Bytes

Contents

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

28 entries across 28 versions & 1 rubygems

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