-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Upgrade to CanCanCan 3.0 #3174
Upgrade to CanCanCan 3.0 #3174
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm ok with this change.
I think we have to go with removing all these useless aliases and this PR gives us the opportunity to make it gradually, without blocking the Rails 6 upgrade, thanks @coorasse !
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am also fine with these changes. But I think we should still allow 2.x if we can
@@ -30,7 +30,7 @@ Gem::Specification.new do |s| | |||
s.add_dependency 'activemerchant', '~> 1.66' | |||
s.add_dependency 'acts_as_list', '~> 0.3' | |||
s.add_dependency 'awesome_nested_set', '~> 3.0', '>= 3.0.1' | |||
s.add_dependency 'cancancan', '~> 2.2' | |||
s.add_dependency 'cancancan', '~> 3.0' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seams we are still able to support cancancan 2.x as well? We should not force everybody else to upgrade to 3.0 as well. Could we set a lower bound of >= 2.2
and upper bound of < 4.0
?
I think Thomas is right, we should be able to not lock cancancan version here
Closing because it doesn't look like we need this anymore. @coorasse feel free to correct me if I'm wrong! |
This PR aims to upgrade to cancancan 3.0 without the assle of rewriting all the permissions logic. see #3148
It basically overrides the changes to the
merge
method of Ability.rb which were breaking solidus permissions mechanism.It should be seen as a temporary patch, so that the "proper" way of managing permissions can be released in the future in a major 3.0 release.
This allows to migrate to Rails 6.0.