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 security checks are executed during a request. It also includes a descriptive testing suite for verifying that authorization rules correctly permit or forbid specific user actions.