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

I have: load_and_authorize_resource :company load_and_authorize_resource :presentation, :through => :company, :shallow => true I would expect that the :shallow => true takes care of correctly loading the @company when its id...

discuss

When i use load_and_authorize_resource in rails 5.2.3. I received an error like "undefined method `before_filter' for ProductsController" I hope you or your team will solve it in the next version...

Hi guys, I am facing a very weird problem as, for some reason, I am getting more results than expected ones. There are Schools. Each School has many Communications, each...

In RSpec view specs 'can?' in the view is calling the default 'current_user', which fails because I'm not using current_user, but current_something_else. I can see how to change the default...

bug

Hi. After reading the wiki, I realized that I can assign custom error messages for different pairs of actions and subject. But how can I assign different messages for same...

#I applied dynamic role and permissions in my application. For that, i used [Abilities-in-Database](https://github.com/ryanb/cancan/wiki/Abilities-in-Database) and [dynamic-roles-and-permissions-using-cancan](https://blog.joshsoftware.com/2012/10/23/dynamic-roles-and-permissions-using-cancan/) in base_controller.rb `class Admin::BaseController < ApplicationController include Admin::InheritAction before_action :authenticate_user! def current_ability @current_ability ||=...

Hello all, I have a question that I can't find an example in the doc, loading nested of nested resource I have ``` class A has_many B :project_id class B...

In my code, if have 2 kinds of users, expert and client. If I initialize client, the resources allowed for expert are not accessible, and if I do not initialize...

when i have a user that doesn't have a role, it has a Infinite loop and not redirecting to the login page my rescue_from ``` rescue_from CanCan::AccessDenied do |exception| if...