Sha256: 0fa8d5075a2506cbd42de2a353a8b0660741499ba83cc0a8257bc2d6c31777d2

Contents?: true

Size: 363 Bytes

Versions: 1

Compression:

Stored size: 363 Bytes

Contents

module CanTango
  module PermissionEngine
    module Selector
      class Users < Base
        attr_reader :user, :user_key

        def initialize subject
          @user = subject.user
          @user_key = user.send(subject.user_key_field)
        end

        def valid? permission
          permission == user_key
        end
      end
    end
  end
end




Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
cantango-0.8.0 lib/cantango/permission_engine/selector/users.rb