-
Notifications
You must be signed in to change notification settings - Fork 641
Open
Labels
Description
Please consider
- Could this feature break backwards-compatibility? no
- Could this feature benefit the many who use Pundit? yup
- Could this feature be useful in most projects that use Pundit? i think so
- Would this feature require Rails? no
- Am I open to creating a Pull Request with the necessary changes? not at the moment
Is your feature request related to a problem? Please describe.
I would like to have logging of unauthorized access events. This is useful for security, debugging and general usage information.
Describe the solution you'd like
Option to enable logging. Possibly options for log level and events (e.g. all authorization events or just unauthorized events).
Describe alternatives you've considered
https://github.com/stevehodges/pundit_logger
These are complicated monkey-patches that can break. Also probably does not cover all use cases because it does rescue Pundit::NotAuthorizedError
, I think it would not work with integrations that already do that (e.g. ActiveAdmin).