Skip to content

Commit

Permalink
Add note about potential DRY issues with Pundit
Browse files Browse the repository at this point in the history
  • Loading branch information
jazairi committed Jun 26, 2024
1 parent 7589125 commit 077a371
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,11 @@ for a more detailed example.)

Pundit also allows for more granular access control via
[scopes](https://github.com/varvet/pundit?tab=readme-ov-file#scopes). This feature is the most compelling reason to
choose Pundit over CanCanCan, but it's unclear whether we would need it in this application.
choose Pundit over CanCanCan, but it's unclear whether we would need it in this application.

Because it requires a separate policy class per model, Pundit can require some repetitive code if authorization
policies are similar across multiple models. We might be able to mitigate this by abstracting common logic to the
`ApplicationPolicy` from which all policy classes inherit.

### Action Policy

Expand Down

0 comments on commit 077a371

Please sign in to comment.