varvet / pundit

Minimal authorization through OO design and pure Ruby classes
MIT License
8.22k stars 625 forks source link

Policy_scope: Don't alter query structure #749

Closed jamesst20 closed 1 year ago

jamesst20 commented 1 year ago

Explanation: https://github.com/varvet/pundit/issues/748

Edit: Just noticed the build failed. Likely because Pundit is not specific to ActiveRecord. Leaving it there just in case you have a better implementation in mind.

Burgestrand commented 1 year ago

Hi! Thanks for the PR.

I believe this puts a dependency on scope having a specific API interface (.where(id: …)). Other than being a breaking change, it also makes Pundit less agnostic about what a scope can be. Because of this I'm choosing not to accept the PR.