# palkan/action_policy

Authorization framework for Ruby/Rails applications

Repository: https://github.com/palkan/action_policy
Canonical: https://ross.abutalabs.com/products/action_policy
Homepage: https://actionpolicy.evilmartians.io
Language: Ruby
License: MIT
License Family: permissive
Topics: rails, authorization, ruby, hacktoberfest
Last push: 2026-07-25T04:34:44+00:00

## Health v2 (maintenance only)
Score: 65/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 94, release rhythm 8, longevity 100
- inputs: {"age_days": 3079, "days_push": 39, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1560, forks 89 (observed 2026-08-28T04:05:03.792300+00:00)

## What it is
Action Policy is an authorization framework for Ruby and Rails applications, built around resource-specific policy classes with composable rules, scoping, caching, and failure-reason tracking. It works Rails-free out of the box but offers seamless Rails, GraphQL, and Graphiti integrations plus first-class RSpec/Minitest testing tools.

## Use cases
- authorize user actions in a Rails controller
- scope database queries to records a user can access
- replace Pundit with a more feature-rich policy framework
- add authorization to a non-Rails Ruby app or GraphQL API
- explain why an authorization check failed
- test authorization rules with RSpec matchers

## When to choose
- you're building a Ruby or Rails app needing a flexible, composable authorization layer
- you want policy scoping, caching, aliases, and failure reasons beyond Pundit's simplicity
- you need authorization in GraphQL Ruby or Graphiti APIs

## When to avoid
- you need a full roles/permissions management system rather than an access-verification layer
- you're not using Ruby
- you want a UI or database-backed permission admin

## Facets
- artifact type: library
- maturity: stable
- function: authorization, middleware
- domain: web-development, backend, security, developer-tools
- platform: ruby
- tags: rails, policies, pundit-alternative, cancancan-alternative, graphql-integration, i18n, testing-matchers, web-server

## Member repositories
- palkan/action_policy (main) score 65

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:05:03.792300+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T04:29:47.607263+00:00, confidence not recorded.
  - readme: https://github.com/palkan/action_policy (fetched 2026-08-28T04:05:03.792300+00:00, sha 239faf1ac276)
  - homepage: https://actionpolicy.evilmartians.io (fetched 2026-08-29T11:29:26.513072+00:00, sha 1f29a43e36f5)
  - site_page: https://actionpolicy.evilmartians.io/guide (fetched 2026-08-29T11:29:26.515608+00:00, sha 81800a2f82ee)
- Data as of 2026-08-30T08:39:29.467469+00:00.
