Skip to content

Logging feature #832

@thisismydesign

Description

@thisismydesign

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).

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions