varvet / pundit

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

Add the policy class to the `NotAuthorizedError` message #812

Closed smitssjors closed 3 weeks ago

smitssjors commented 4 weeks ago

This PR fixes #681 and #647.

Burgestrand commented 4 weeks ago

Hi! Thanks for updating the old PR!

This does not fix #647, but it does fix #681.

I'm not sure why the pull request templates we have didn't get proposed, but please have a look at it: https://github.com/varvet/pundit/blob/main/.github/PULL_REQUEST_TEMPLATE/pull_request_template.md - this PR is missing a changelog entry 🙂

smitssjors commented 3 weeks ago

I updated the PR to now actually take care of #647 and I updated the CHANGELOG.md

I did not get the template when I made the PR via the button in my fork. I did however read CONTRIBUTING.md so I added updating the CHANGELOG as a step to hopefully prevent these mistakes in the future.

Burgestrand commented 3 weeks ago

The jruby failures are unrelated to this change. Something is up with the more recent jruby version on our GitHub CI pipeline.

Burgestrand commented 3 weeks ago

Either way I think this should probably be good! I'll most likely merge this soon. Travelling to Baltic Ruby today though 😊

smitssjors commented 3 weeks ago

I think these changes are indeed better so I added them

Burgestrand commented 3 weeks ago

Thank you!