Pundit CRUD authorization
I'm using Pundit with JSP and would recommend it.
As for a snippet, the instructions for the Gem are pretty straightforward https://github.com/varvet/pundit/tree/v2.1.0 and if you just install the gem and then generate the default Application policy, you'll have the basic CRUD actions covered. If or when you need finer grained authorization, you can write Polices to cover your specific use cases and it should pretty much just work.
If you're using multi-tenant features, you might benefit from overriding the pundit_user with context that includes the account, as discussed in https://jumpstartrails.com/discussions/424 so that you can check roles on the account user more conveniently.
As for a snippet, the instructions for the Gem are pretty straightforward https://github.com/varvet/pundit/tree/v2.1.0 and if you just install the gem and then generate the default Application policy, you'll have the basic CRUD actions covered. If or when you need finer grained authorization, you can write Polices to cover your specific use cases and it should pretty much just work.
If you're using multi-tenant features, you might benefit from overriding the pundit_user with context that includes the account, as discussed in https://jumpstartrails.com/discussions/424 so that you can check roles on the account user more conveniently.
Notifications
You’re not receiving notifications from this thread.