CanCanCommunity/cancancan
The authorization Gem for Ruby on Rails. observed · 2026-08-28
Health v2 · maintenance only
66/100
- Activity 96
- Release rhythm 8
- Longevity 100
How is this computed?
round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10) — computed 2026-09-03. Adoption (stars, forks) is never an input.
- gap_med: n/a
- age_days: 4578
- days_rel: n/a
- days_push: 24
- n_releases_24m: 0
Adoption not part of the score
5686 stars · 631 forks observed · 2026-08-28
What it is AI-extracted, prompt v1, taxonomy v1, 2026-08-29, confidence not recorded
CanCanCan is an authorization library for Ruby and Ruby on Rails that restricts which resources a user can access. Permissions are defined in centralized Ability classes and checked via helpers in controllers and views, with automatic record loading and permission scoping for Rails controllers.
Use cases
- restrict which records a user can read or edit in a Rails app
- define role-based permissions in one Ability file
- authorize controller actions automatically in Rails
- scope database queries to only permitted records
- check permissions in views with can? and cannot?
- handle guest vs logged-in vs admin access rules
When to choose
- you are building a Ruby on Rails application and need centralized authorization logic
- you want permissions defined once and reused across controllers, views, and queries
- you need role-based or attribute-based access control without duplicating checks
When to avoid
- you need authentication (login/password handling) rather than authorization
- you are not using Ruby or Rails
- you need fine-grained, dynamically administered permissions managed at runtime in a database-driven policy engine
Facets
library · maturity stable
authorization middleware web-development backend security ruby ruby-on-rails gem permissions access-control ability-rules web-server
1 source
- readme: https://github.com/CanCanCommunity/cancancan · fetched 2026-08-28 · edc240be390f
Member repositories
| Repository | Role | Health v2 |
|---|---|---|
| CanCanCommunity/cancancan | main | 66 |
For agents
markdown · JSON · MCP: product_card(name="CanCanCommunity/cancancan")
Data as of 2026-08-30T08:39:29.467469+00:00 · Report a problem