cancancommunity/cancancan

The authorization Gem for Ruby on Rails.

View on GitHub ↗Jump to charts ↓

Summary Information

Updated 59 minutes ago
Added to GitGenius on September 11th, 2026
Created on February 19th, 2014
Open Issues & Pull Requests: 91 (+0)
GitHub issues: Enabled
Number of forks: 628
Total Stargazers: 5,683 (+0)
Total Subscribers: 94 (+0)

Repository Insights (GitGenius)

Median issue/PR response: 34.6 days
Mean response time: 145.1 days
90th percentile: 672.7 days
Tracked items: 15

Charts & Analytics

Fetching additional details & charts...

Issue Activity (beta)

Open issues: 18
New in 7 days: 0
Closed in 7 days: 0
Avg open age: 778 days
Stale 30+ days: 18
Stale 90+ days: 16

Recent activity

Opened in 7 days: 0
Closed in 7 days: 0
Comments in 7 days: 0
Events in 7 days: 0

Top labels

No label distribution available yet.

Most active issues this week

No issue events were indexed in the last 7 days.

Detailed Description

CanCanCan is an authorization library for Ruby on Rails that restricts what resources a given user is allowed to access.

The library solves the problem of scattered permission logic by centralizing all authorization rules in one or multiple ability files rather than duplicating them across controllers, views, and database queries. It provides two main components: an authorizations library for defining access rules and checking permissions, and Rails helpers that automatically load and authorize resources in controllers, reducing boilerplate code.

CanCanCan suits Rails applications where you need fine-grained permission control. It distinguishes itself through the ability to fetch only the records a user is authorized to access using the same rules defined in your ability files, rather than requiring separate query logic. The tool is appropriate for projects ranging from simple role-based access to complex permission hierarchies, and it keeps authorization logic maintainable by centralizing it in one place for easy testing and updates.

The project maintains active engagement with its community through a dedicated developer guide and documentation. Development is supported by multiple sponsors, and the maintainers actively encourage community contribution through pull requests and issue reporting. The codebase is tested against multiple versions of Rails and different model adapters using appraisals to ensure broad compatibility.