Permalink
Commits on May 18, 2011
  1. releasing 1.6.5

    ryanb committed May 18, 2011
  2. pass action and subject through AccessDenied exception when :through …

    ryanb committed May 18, 2011
    …isn't found - closes #366
Commits on May 17, 2011
  1. Merge pull request #363 from rahearn/mongoid-conditions-empty

    ryanb committed May 17, 2011
    Fixes bug in mongoid_adapter with empty conditions hash
Commits on May 12, 2011
  1. Processes can rules only if no empty conditions rules are present

    Ryan Ahearn committed May 12, 2011
    1) remove all empty conditions hashes from the rules, they are included
     in the records through `@model_class.all`
    2) only process can rules if the new and old rules lists are the same
      length (meaning there were no empty conditions hashes)
    3) always process cannot rules
Commits on May 10, 2011
  1. Fixes bug in mongoid_adapter with empty conditions hash

    Ryan Ahearn committed May 10, 2011
    * adds mongoid query that matches every record when
    rule.conditions.empty? is true
Commits on May 2, 2011
  1. Merge pull request #355 from emmanuel/issue/245.

    ryanb committed May 2, 2011
    DataMapper adapter improvements
Commits on Apr 29, 2011
  1. Return empty set early if no can rules are present.

    emmanuel committed Apr 29, 2011
    Thanks dkubb!
Commits on Apr 27, 2011
  1. Merged pull request #352 from cardagin/topic/mongoid-adapter-enhancem…

    ryanb committed Apr 27, 2011
    …ents.
    
    Augments Mongoid adapter by handling case where attribute is an array
Commits on Apr 25, 2011
  1. Merged pull request #343 from rahearn/mongoid-scope.

    ryanb committed Apr 25, 2011
    Adds ability to use Scope query with Mongoid
Commits on Apr 15, 2011
  1. Adds ability to use Scope query with Mongoid

    Ryan Ahearn committed Apr 15, 2011
    Same limitations apply as with active record
    * can not be OR'd with other rules for same ability/controller
Commits on Apr 1, 2011
  1. Merge branch 'optional-associations' of https://github.com/socialcast…

    ryanb committed Apr 1, 2011
    …/cancan into socialcast-optional-associations
  2. Fixed bug where conditions on an optionally associated object would t…

    thatothermitch committed Apr 1, 2011
    …hrow exceptions if the associated object was not present at the rule match time.
Commits on Mar 30, 2011
  1. releasing 1.6.4

    ryanb committed Mar 30, 2011
  2. fixing mongoid 'or' error - closes #322

    ryanb committed Mar 30, 2011
Commits on Mar 25, 2011
  1. releasing 1.6.3

    ryanb committed Mar 25, 2011
  2. make sure ActiveRecord::Relation is defined before checking condition…

    ryanb committed Mar 25, 2011
    …s against it so Rails 2 is supported again - closes #312
Commits on Mar 18, 2011
  1. releasing 1.6.2

    ryanb committed Mar 18, 2011
  2. fixing failing MetaWhere spec

    ryanb committed Mar 18, 2011
Commits on Mar 16, 2011
  1. releasing 1.6.1

    ryanb committed Mar 16, 2011
  2. use Item.new instead of build_item for singleton resource so it doesn…

    ryanb committed Mar 16, 2011
    …'t mess up database - closes #304
  3. making accessible_by action default to :index and parent action defau…

    ryanb committed Mar 16, 2011
    …lt to :show so we don't check :read action directly - closes #302
  4. Fixes inherited_resources collection authorization

    Adam Wróbel committed Mar 16, 2011
    This reverts e3eab13
    
    I don't know what was the idea of that, but it turned out REAL bad.
    
    `collection` sets the collection instance variable. `resource_base` is used all
    over CanCan. It's also used inside `load_collection?` which is checked before
    `load_collection` is called. That means we actually set the collection instance
    variable through inherited_resources (without any authorization whatsoever) before trying to load it through CanCan using `accessible_by`.
    
        1. def load_resource
        2.  unless skip?(:load)
        3.    if load_instance?
        4.      self.resource_instance ||= load_resource_instance
        5.    elsif load_collection?
        6.      self.collection_instance ||= load_collection
        7.    end
        8.  end
        9. end
    
    `collection_instance` is set on line 5 instead of line 6.
Commits on Mar 11, 2011
  1. releasing 1.6.0

    ryanb committed Mar 11, 2011
Commits on Mar 9, 2011