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

Fix default permission set breaking accessible_by #159

Merged
merged 4 commits into from
Oct 9, 2020

Conversation

aldesantis
Copy link
Member

@aldesantis aldesantis commented Oct 8, 2020

Adds an ActiveRecord scope to our default permission set, so that #accessible_by can be used with SolidusSubscriptions::Subscription once more.

@aldesantis aldesantis force-pushed the aldesantis/permissions-fix branch 3 times, most recently from 6e6ddb7 to 4dcb253 Compare October 8, 2020 14:39
@aldesantis aldesantis changed the title wip Fix broken permissions Oct 8, 2020
@aldesantis aldesantis force-pushed the aldesantis/permissions-fix branch 3 times, most recently from 606a261 to 44093af Compare October 8, 2020 14:40
With an AR scope, `#accessible_by` can be properly used.
@aldesantis aldesantis changed the title Fix broken permissions Add scope to permission set Oct 8, 2020
@aldesantis aldesantis force-pushed the aldesantis/permissions-fix branch from 44093af to f55ce37 Compare October 8, 2020 14:55
CanCan 2 complains about not being able to merge abilities that use
an ActiveRecord scope, so we need to use an SQL string instead.
@aldesantis aldesantis merged commit ceb0b5a into master Oct 9, 2020
@aldesantis aldesantis deleted the aldesantis/permissions-fix branch October 9, 2020 08:37
@aldesantis aldesantis added the bug Describes or fixes a bug. label Oct 9, 2020
@aldesantis aldesantis self-assigned this Oct 9, 2020
@aldesantis aldesantis changed the title Add scope to permission set Fix default permission set not allowing indexing Oct 9, 2020
@aldesantis aldesantis changed the title Fix default permission set not allowing indexing Fix default permission set not being usable with accessible_by Oct 9, 2020
@aldesantis aldesantis changed the title Fix default permission set not being usable with accessible_by Fix default permission set breaking accessible_by Oct 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Describes or fixes a bug.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant