Sha256: 797f10f258c5f2c36f262594720c9729fd35eea15a70e36bbbe0b88f6ff51839

Contents?: true

Size: 374 Bytes

Versions: 21

Compression:

Stored size: 374 Bytes

Contents

module CanTango
  class PermissionEngine < Engine
    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 relevant? permission
          permission == user_key
        end
      end
    end
  end
end




Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
cantango-0.9.4.7 lib/cantango/permission_engine/selector/users.rb
cantango-0.9.4.6 lib/cantango/permission_engine/selector/users.rb
cantango-0.9.4.5 lib/cantango/permission_engine/selector/users.rb
cantango-0.9.4.3 lib/cantango/permission_engine/selector/users.rb
cantango-0.9.4.2 lib/cantango/permission_engine/selector/users.rb
cantango-0.9.4.1 lib/cantango/permission_engine/selector/users.rb
cantango-0.9.4 lib/cantango/permission_engine/selector/users.rb
cantango-0.9.3.2 lib/cantango/permission_engine/selector/users.rb
cantango-0.8.9.5 lib/cantango/permission_engine/selector/users.rb
cantango-0.8.9.4 lib/cantango/permission_engine/selector/users.rb
cantango-0.8.9.3 lib/cantango/permission_engine/selector/users.rb
cantango-0.8.9.2 lib/cantango/permission_engine/selector/users.rb
cantango-0.8.9.1 lib/cantango/permission_engine/selector/users.rb
cantango-0.8.9 lib/cantango/permission_engine/selector/users.rb
cantango-0.8.8.1 lib/cantango/permission_engine/selector/users.rb
cantango-0.8.8 lib/cantango/permission_engine/selector/users.rb
cantango-0.8.7 lib/cantango/permission_engine/selector/users.rb
cantango-0.8.6.2 lib/cantango/permission_engine/selector/users.rb
cantango-0.8.6.1 lib/cantango/permission_engine/selector/users.rb
cantango-0.8.6 lib/cantango/permission_engine/selector/users.rb