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.0.pre.beta11 app/policies/renalware/user_policy.rb
renalware-core-2.0.0.pre.beta10 app/policies/renalware/user_policy.rb
renalware-core-2.0.0.pre.beta9 app/policies/renalware/user_policy.rb
renalware-core-2.0.0.pre.beta8 app/policies/renalware/user_policy.rb
renalware-core-2.0.0.pre.beta7 app/policies/renalware/user_policy.rb
renalware-core-2.0.0.pre.beta6 app/policies/renalware/user_policy.rb
renalware-core-2.0.0.pre.beta5 app/policies/renalware/user_policy.rb
renalware-core-2.0.0.pre.beta4 app/policies/renalware/user_policy.rb