Skip to content
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

Closed
wants to merge 1 commit into from

Conversation

coorasse
Copy link
Contributor

@coorasse coorasse commented Apr 12, 2019

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.

@coorasse coorasse changed the title **Description** <!-- Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. Upgrade to CanCanCan 3.0 Apr 12, 2019
@coorasse coorasse mentioned this pull request Apr 12, 2019
kennyadsl
kennyadsl previously approved these changes May 16, 2019
Copy link
Member

@kennyadsl kennyadsl left a 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 !

Copy link
Member

@tvdeyen tvdeyen left a 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'
Copy link
Member

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?

@kennyadsl kennyadsl dismissed their stale review June 21, 2019 14:40

I think Thomas is right, we should be able to not lock cancancan version here

@kennyadsl kennyadsl mentioned this pull request Aug 22, 2019
7 tasks
@aldesantis
Copy link
Member

Closing because it doesn't look like we need this anymore. @coorasse feel free to correct me if I'm wrong!

@aldesantis aldesantis closed this May 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants