-
Is it possible in CanCan 2 to define abilities on attributes, and the possible values that can be set.
I suppose the broadest example is the `User.role` ... imagine the role tiers as follows:
```
A…
-
```
class A < ActiveRecord::Base; end
class B < A; end
class C < A;end
can :read, B, :status => :active
can :read, C, :user_id => @user.id
A.accessible_by(current_ability)
```
I basically want all …
-
In many applications, different access violations should redirect to different pages.
e.g. if the user is not signed in and tries to comment on something, they get redirected to the user sign in page…
-
CanCan fires an extra query when using `load_and_authorize_resource` along with a pagination. Is this by design?
```
load_and_authorize_resource :group
load_and_authorize_resource :event, through: :g…
-
In ability.rb I have:
``` ruby
user ||= user.new # guest user
if user.id == 1 #quick hack
can :access, :all
elsif
can :read, :domains, [:name, :entries], :user_id => user.id
…
-
I have CanCan and Devise on my Rails 4.1 app and everything works great except for one thing.
I have defined a role :admin that basically can :manage :all including profiles of other users. After usi…
-
Ruby2.1.4
Rails 4.1.7
gem Devise CanCan
-
Hi there,
I'm just wondering whether you would like to use [casl](https://github.com/stalniy/casl) to achieve your goals.
This library implements cancan for JavaScript in isomorphic way + a bit…
-
Majority of functionality and implementation of Cancan is not rails specific.
However, it is tightly coupled, making it impossible to be used with lighter framework, like with Rack directly or with S…
-
Hello,
This is a suggestion, I don't know how feasible it is...
The current implementation only checks if the parameters present in params hash are authorized, not if those are actually changing the m…
gamov updated
10 years ago