Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Introduce ActionPolicy authorization adapter#8708

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Draft
amkisko wants to merge2 commits intoactiveadmin:master
base:master
Choose a base branch
Loading
fromamkisko:patch/action-policy-adapter

Conversation

amkisko
Copy link

This PR introduces a new ActiveAdmin::ActionPolicyAdapter to enable integration with theAction Policy authorization framework. The adapter implements both #authorized? and #scope_collection methods, mapping ActiveAdmin’s internal permissions to Action Policy’s rules and scopes.

ActiveAdmin supports a pluggable authorization system, but out of the box, it only provides adapters for popular frameworks like Pundit and CanCanCan. As more teams adoptAction Policy for its performance, flexibility, and first-class Rails support, it’s increasingly desirable to make ActiveAdmin compatible with it out of the box.

References:

This commit introduces the ActionPolicy adapter for ActiveAdmin, allowing for flexible authorization management. The ActionPolicy gem is added to the Gemfile, and relevant documentation is updated to guide users on configuring the adapter. Additionally, new policy templates are included to demonstrate usage.Ref:https://actionpolicy.evilmartians.io
@amkisko
Copy link
Author

amkisko commentedMay 2, 2025
edited
Loading

@tagliala@javierjulio Hey! Here's better PR for review and discussion.

There is one critical thing to figure out is how to organize test templates as they are intersecting with Pundit. I suggested the option, but really I don't like it at this point, but it should work. Also I could not figure out yet what is missing on my machine for running rspec, tests are not checked.

And sure before merging squashing required (so that you can edit commit message to the preferred format) or I can recreate it again.

@amkiskoamkisko marked this pull request as draftMay 2, 2025 09:35
Copy link
Contributor

@taglialatagliala left a comment
edited
Loading

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Hello,

Thanks for this PR.

Also I could not figure out yet what is missing on my machine for running rspec, tests are not checked.

Maybe something related to bundler? I've seen the removal ofruby, so I guess thatbuild native extensions is somehow not working.

Run specs with justCI=1 rake, that will create the test app and proceed with all the specs

First comments:

  1. Rebase from baster
  2. Remove the change in the comment
  3. Please make sure that specs and linters pass locally
313 files inspected, 17 offenses detected, 17 offenses autocorrectable

amkisko reacted with thumbs up emoji
@@ -415,10 +412,10 @@ GEM

PLATFORMS
arm64-darwin
ruby
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Please remove this change

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Yeah, I saw this one, it was automatically modified by bundler locally.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@taglialataglialatagliala left review comments

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@amkisko@tagliala

[8]ページ先頭

©2009-2025 Movatter.jp