Pundit CRUD authorization

Hey, i'm evaluating jumpstart pro and one of the requirements is to have account user roles CRUD authorization. has anyone ever implement this in their apps? how easy to get this setup or maybe a little snippet to show how it's done. thanks


Ken Lynch
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.
Thanks Ken! that's what i'm looking for
Notifications
You’re not receiving notifications from this thread.
© 2022 GoRails, LLC