awesome-repositories.com
Blog
MCP
awesome-repositories.com

Discover the best open-source repositories with AI-powered search.

ExploreCurated searchesOpen-source alternativesSelf-hosted softwareBlogSitemap
ProjectMCP serverAboutHow we rankPress
LegalPrivacyTerms
© 2026 Bringes Technology SRL·VAT RO45896025·hello@awesome-repositories.com
varvet avatar

varvet/pundit

0
View on GitHub↗
8,509 stars·644 forks·Ruby·MIT·13 views

Pundit

Pundit is an authorization framework for Ruby applications that enforces permissions through plain Ruby policy objects. It maps controller actions to policy methods, automatically inferring which policy class and query method to call based on the action name, and raises a custom exception when access is denied.

The framework distinguishes itself by using plain Ruby classes without external DSLs or configuration files, and by providing a development-time verification guard that raises an error if a controller action runs without an authorization call. It also supports namespace-based policy organization, allowing different contexts to use separate policy classes, and includes a scope-class mechanism that restricts database query results to records the current user is permitted to see.

Additional capabilities include the ability to override the default user resolution method, rescue denied authorization exceptions to redirect users with custom messages, and test policy permissions through expressive specs that validate which roles are allowed or denied specific actions. The project also maintains a code of conduct to govern community interactions.

Features

  • Ruby Authorization Frameworks - An authorization library that enforces permissions through plain Ruby policy objects.
  • Authorization Coverage Guards - Provides a development-only guard that raises an error if an action runs without authorization.
  • Authorization Scope Classes - Restricts database queries to authorized records using policy-defined scope classes.
  • Authorization Query Scopes - Limits database query results to records the current user is permitted to see.
  • Policy-Defined Query Scopes - Filters database queries through policy-defined scope classes to restrict results to authorized records.
  • Authorization Policies - Encapsulates authorization logic in plain Ruby policy objects with query methods for actions.
  • Controller Action Authorization - Authorizes controller actions by inferring policy classes and calling the matching query method.
  • Policy-Based Access Control - Maps controller actions to policy classes and query methods for permission checks.
  • Authorization Coverage Auditing - Raises an exception in development if a controller action runs without an authorization check.
  • Authorization Exception Flows - Raises custom exceptions on denied permissions that can be rescued for user-friendly responses.
  • Controller Action Resolution - Maps controller action names to policy methods for automatic permission checking.
  • Customizable User Resolution - Enables customization of the user lookup method for authorization checks.
  • Customizable User Lookups - Overrides the default user lookup so authorization uses a different method or object.
  • Policy Permission Specs - Provides expressive test specs for validating which roles are allowed or denied specific actions.
  • Authorization Exception Rescue - Catches denied-permission exceptions to redirect users with custom messages or error pages.
  • Namespace Grouping - Groups policies under module prefixes to separate authorization rules for different contexts.

Star history

Star history chart for varvet/punditStar history chart for varvet/pundit

How this analysis was created: This summary and feature list are AI-generated from collected project material and can contain mistakes. Stars, license and language are imported from GitHub. Inclusion does not mean that we have tested or audited this project. Check the source documentation for any feature you depend on. Learn more on our About page.

AI search

Explore more awesome repositories

Describe what you need in plain English — the AI ranks thousands of curated open-source projects by relevance.

Start searching with AI

Projects sharing features with Pundit

These projects share indexed features with Pundit. Shared tags can include platform or build tooling; verify the primary use case before treating a result as a replacement.
  • elabs/punditelabs avatar

    elabs/pundit

    8,509View on GitHub↗

    Pundit is a Ruby authorization framework that implements policy-based access control. It maps domain models to dedicated logic classes that determine whether a user is permitted to perform specific actions on data objects. The framework utilizes plain Ruby objects to decouple authorization logic from the model. It includes mechanisms for data query scoping to filter record collections based on user permissions, as well as attribute-level permission control to restrict which specific model fields a user can modify. The system provides tools for authorization coverage verification to ensure se

    Ruby
    View on GitHub↗8,509
  • cancancommunity/cancancanCanCanCommunity avatar

    CanCanCommunity/cancancan

    5,689View on GitHub↗

    CanCanCan is an authorization library for Ruby on Rails that lets developers define user permissions in a single, centralized file using a readable domain-specific language. It enforces those permissions across controllers, views, and database queries, providing a unified approach to access control in Rails applications. The library works by evaluating a prioritized list of rules that combine actions, models, and conditions, supporting aliases, blocks, and conditional logic. It automatically authorizes controller actions through Rails' before_action lifecycle, raising exceptions on unauthoriz

    Ruby
    View on GitHub↗5,689
  • palkan/action_policypalkan avatar

    palkan/action_policy

    1,557View on GitHub↗

    Action Policy is a Ruby authorization framework designed to manage user access and permissions by encapsulating security logic into dedicated policy classes. It provides a structured system for defining access rules that evaluate user actions against specific application resources, ensuring that security logic remains decoupled from the primary application code. The framework distinguishes itself through its ability to handle complex authorization requirements across diverse interfaces, including web controllers and various API formats. It supports dynamic permission evaluation by utilizing a

    Rubyauthorizationhacktoberfestrails
    View on GitHub↗1,557
  • cerbos/cerboscerbos avatar

    cerbos/cerbos

    4,460View on GitHub↗

    Cerbos is an open-source authorization service that provides a centralized, language-agnostic engine for managing access control. It functions as a policy-as-code platform, allowing teams to define, test, and distribute authorization rules using declarative YAML or JSON configurations. By decoupling access logic from application code, it enables consistent permission enforcement across diverse service stacks. The project distinguishes itself through its ability to translate high-level authorization policies into native database query filters. This capability allows applications to enforce sec

    Goaccess-controlauthorizationgo
    View on GitHub↗4,460
Compare all 30 related projects→

Frequently asked questions

What does varvet/pundit do?

Pundit is an authorization framework for Ruby applications that enforces permissions through plain Ruby policy objects. It maps controller actions to policy methods, automatically inferring which policy class and query method to call based on the action name, and raises a custom exception when access is denied.

What are the main features of varvet/pundit?

The main features of varvet/pundit are: Ruby Authorization Frameworks, Authorization Coverage Guards, Authorization Scope Classes, Authorization Query Scopes, Policy-Defined Query Scopes, Authorization Policies, Controller Action Authorization, Policy-Based Access Control.

Which projects share features with varvet/pundit?

Projects with overlapping indexed features include: elabs/pundit — Pundit is a Ruby authorization framework that implements policy-based access control. It maps domain models to… cancancommunity/cancancan — CanCanCan is an authorization library for Ruby on Rails that lets developers define user permissions in a single,… palkan/action_policy — Action Policy is a Ruby authorization framework designed to manage user access and permissions by encapsulating… cerbos/cerbos — Cerbos is an open-source authorization service that provides a centralized, language-agnostic engine for managing… casbin/casbin — Casbin is an authorization library that provides a model-based engine for enforcing access control across diverse… octelium/octelium — Octelium is a zero-trust network access platform and identity-aware proxy designed to secure private HTTP, SSH, and…