CanCanCan is an authorization library for Ruby and Ruby on Rails which restricts what resources a given user is allowed to access. All permissions can be defined in one or multiple ability files and not duplicated across controllers, views, and database queries, keeping your permissions logic in one place for easy maintenance and testing. Authorizations library that allows you to define the rules to access different objects, and provides helpers to check for those permissions. Rails helpers to simplify the code in Rails Controllers by performing the loading and checking of permissions of models automatically and reduce duplicated code. The current user's permissions can then be checked using the can? and cannot? methods in views and controllers. One of the key features of CanCanCan, compared to other authorization libraries, is the possibility to retrieve all the objects that the user is authorized to access.

Features

  • CanCanCan uses appraisals to test the code base against multiple versions of Rails
  • Retrieve all the objects that the user is authorized to access
  • User permissions are defined in an Ability class
  • Define the rules to access different objects
  • Simplify the code in Rails Controllers
  • Reduce duplicated code

Project Samples

Project Activity

See All Activity >

Categories

Security

License

MIT License

Follow CanCanCan

CanCanCan Web Site

You Might Also Like
Our Free Plans just got better! | Auth0 by Okta Icon
Our Free Plans just got better! | Auth0 by Okta

With up to 25k MAUs and unlimited Okta connections, our Free Plan lets you focus on what you do best—building great apps.

You asked, we delivered! Auth0 is excited to expand our Free and Paid plans to include more options so you can focus on building, deploying, and scaling applications without having to worry about your secuirty. Auth0 now, thank yourself later.
Try free now
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of CanCanCan!

Additional Project Details

Programming Language

Ruby

Related Categories

Ruby Security Software

Registered

2021-11-05