Action Policy VS CanCanCan

Compare Action Policy vs CanCanCan and see what are their differences.

Action Policy

Authorization framework for Ruby/Rails applications (by palkan)

CanCanCan

The authorization Gem for Ruby on Rails. (by CanCanCommunity)
Our great sponsors
  • SonarQube - Static code analysis for 29 languages.
  • InfluxDB - Access the most powerful time series database as a service
  • SaaSHub - Software Alternatives and Reviews
Action Policy CanCanCan
5 16
1,101 5,304
- 0.5%
5.4 6.3
10 days ago 19 days ago
Ruby Ruby
MIT License MIT License
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.

Action Policy

Posts with mentions or reviews of Action Policy. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2022-08-16.

CanCanCan

Posts with mentions or reviews of CanCanCan. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2023-03-09.
  • How would you store roles with up to 64 permissions?
    2 projects | reddit.com/r/rails | 9 Mar 2023
    Would you do : 1. a roles table with the name of the role and 64 booleans? 2. A roles table with one JSON field? (using rails json data type) 3. A roles table and a permissions table, similar do what is suggested in the cancancan developpers guide:
  • Protect your GraphQL data with resource_policy
    3 projects | dev.to | 20 Feb 2023
    Expressing authorization rules can be a bit challenging with the use of other authorization gems, such as pundit or cancancan. The resource_policy gem provides a more concise and expressive policy definition that uses a simple block-based syntax that makes it easy to understand and write authorization rules for each attribute.
  • Top 5 Ruby on Rails Gems
    5 projects | dev.to | 4 Jan 2023
  • Permissions (access control) in web apps
    7 projects | dev.to | 30 Nov 2022
    https://github.com/CanCanCommunity/cancancan (Ruby on Rails ABAC) Same like casl.js, but for Ruby on Rails! Casl.js was actually inspired and modeled by cancancan.
  • Web-app security risks demonstrated
    3 projects | dev.to | 1 Nov 2022
    In production code you would most likely use a library for access control, such as CanCanCan
  • YAGNI exceptions
    3 projects | reddit.com/r/programming | 17 Oct 2022
    PS If you do mobile / web work (or something else with "detached" UI), I find that declarative access control rules are far superior to imperative ones, because they can be serialized and shipped over the wire. For example, backend running cancancan can be easily send the same rules to casl on the frontend, while if you used something like pundit to secure your backend, you either end up re-implementing it in the frontend, or sending ton of "canEdit" flags with every record.
  • Best practice for displaying info to different user roles?
    3 projects | reddit.com/r/rails | 4 Oct 2022
    You can use a gem like cancancan (https://github.com/CanCanCommunity/cancancan )to manage authorization, and its helpers to show stuff based on what a user can do
  • What are the gems that every Ruby dev should know how to use?
    4 projects | reddit.com/r/rails | 3 Aug 2022
    It fails deadly -- forgetting to pass an instance grants unintended access, and this problem is so bad they have a document explaining how to avoid it. If you use a permission in an unintended way, it should not grant access.
  • Complete Guide To Managing User Permissions In Rails Apps
    4 projects | dev.to | 14 Apr 2022
    CanCanCan: CanCanCan is another authorization library for Ruby and Ruby on Rails. It is an alternative to CanCan and is currently being maintained. With 4.9k stars on GitHub, it is the least popular, but it works pretty well and is well maintained.
  • Mugshot Bot Acquisition: our side of the story
    2 projects | dev.to | 12 Jan 2022
    I have worked on Ruby On Rails for 10 years now, and I also became the maintainer of one of the most historical gems, CanCanCan. Ruby On Rails was my bet ten years ago, when I quit my previous job, to switch from Java to Ruby, and to move from Italy to Switzerland at the same time.

What are some alternatives?

When comparing Action Policy and CanCanCan you can also consider the following projects:

Pundit - Minimal authorization through OO design and pure Ruby classes

rolify - Role management library with resource scoping

Authority

Declarative Authorization - An unmaintained authorization plugin for Rails. Please fork to support current versions of Rails

AccessGranted - Multi-role and whitelist based authorization gem for Rails (and not only Rails!)

oso - Oso is a batteries-included framework for building authorization in your application.

acl9 - Yet another role-based authorization system for Rails

Consul - Scope-based authorization for Ruby on Rails.

banken - Simple and lightweight authorization library for Rails

Canard - Makes role based authorization in Rails really simple. Wraps CanCan and RoleModel up with a smattering of syntactic sugar, some generators and scopes.