Sha256: 4a50898d5e7a5f369e48826f1ef7dedb6d40c456ac2398d21edb7c8dd9c497fb

Contents?: true

Size: 435 Bytes

Versions: 21

Compression:

Stored size: 435 Bytes

Contents

module CanTango
  class PermissionEngine < Engine
    module Selector
      class Roles < Base
        attr_reader :roles

        def initialize subject
          @roles = subject.roles_list
        end

        protected

        def relevant? role
          filter(role).valid?
        end

        def filter role
          CanTango::Filters::RoleFilter.new role, roles
        end

        private

      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/roles.rb
cantango-0.9.4.6 lib/cantango/permission_engine/selector/roles.rb
cantango-0.9.4.5 lib/cantango/permission_engine/selector/roles.rb
cantango-0.9.4.3 lib/cantango/permission_engine/selector/roles.rb
cantango-0.9.4.2 lib/cantango/permission_engine/selector/roles.rb
cantango-0.9.4.1 lib/cantango/permission_engine/selector/roles.rb
cantango-0.9.4 lib/cantango/permission_engine/selector/roles.rb
cantango-0.9.3.2 lib/cantango/permission_engine/selector/roles.rb
cantango-0.8.9.5 lib/cantango/permission_engine/selector/roles.rb
cantango-0.8.9.4 lib/cantango/permission_engine/selector/roles.rb
cantango-0.8.9.3 lib/cantango/permission_engine/selector/roles.rb
cantango-0.8.9.2 lib/cantango/permission_engine/selector/roles.rb
cantango-0.8.9.1 lib/cantango/permission_engine/selector/roles.rb
cantango-0.8.9 lib/cantango/permission_engine/selector/roles.rb
cantango-0.8.8.1 lib/cantango/permission_engine/selector/roles.rb
cantango-0.8.8 lib/cantango/permission_engine/selector/roles.rb
cantango-0.8.7 lib/cantango/permission_engine/selector/roles.rb
cantango-0.8.6.2 lib/cantango/permission_engine/selector/roles.rb
cantango-0.8.6.1 lib/cantango/permission_engine/selector/roles.rb
cantango-0.8.6 lib/cantango/permission_engine/selector/roles.rb