cancan icon indicating copy to clipboard operation
cancan copied to clipboard

Authorization Gem for Ruby on Rails.

Results 100 cancan issues
Sort by recently updated
recently updated
newest added

Hi there, I'm using the cancan gem to control which action users can perform in a simple blogging app (the current logged in user can't delete other users posts) In...

When adding options to enable_authorization, the following error is displayed: Started DELETE "/users/sign_out" for 192.168.1.5 at 2014-01-16 22:59:04 -0600 Processing by Devise::SessionsController#destroy as HTML Parameters: {"authenticity_token"=>"eG2YUYItoG7xz3Y/tMteKMQCNidGJHtktEAxsBWX2yA="} Completed 500 Internal Server...

I have an application with quite a few models and lots of "cans" and "cannots" associated with those models. The problem I'm running into is that running the initialize method...

Per the documentation, to check if a user has the ability to do something to any element in the view, you do something like this: ``` erb ``` Or you...

Some of my findings using cc2.0: 1 . Craps out with multiple rules going through the same nested association: ``` ruby Sale.joins(:order_request => :business_site).where({:order_request => {:business_site => {:business_id => 12}}}...

bug

I'm having an issue setting up an ability that looks like this: ``` can :read, Project, :allocate_to => user.id ``` The problem is ``` ability.can?(:read, my_project) ``` returns false even...

> "parting is such sweet sorrow" As discussed for the last month in the comment thread of pull https://github.com/ryanb/cancan/pull/989 it is time to move cancan forward before it fizzles. While...

CanCan Matchers do not conform with the new RSpec (currently 3.0.0.rc1, approaching official release).

I am using active admin. I am able to add permissions for page_action methods, but I don't know how to add permissions for collection_action methods in models/ability.rb .

Hi, I have a model with a self.accessible_by(ability, action) method defined. Let's call the model Thing. This method does return an ActiveRecord::Relation instance. In the ThingController, load_and_authorize_resource is used and...