Use of pundit, with roles and enforcing plan attributes?
I've done a little work with pundit, but my knowledge is a bit basic... A couple of questions,
- Is it appropriate to use pundit with roles? If I create a user who is a 'viewer' role, can/should I add the roles logic to pundit policies? I've been putting this logic in controllers and it feels like I should be adding this specific logic in pundit.
- Could/should I use pundit to enforce the attributes of my plans? So if your plan that you've purchased allows for 5 users, should I create a policy so that when an admin tried to invite the 6th user, they'd receive an exception in Pundit prompting them to upgrade, etc.
Any pointers would be helpful, sorry for the n00b questions...
We may add Pundit at some point. Really, there's not a lot in Jumpstart Pro that requires permissions, so I wanted to leave it open for people to use whatever they wanted.
I can see possibly just using Pundit as the default for Jumpstart at some point. I just wanted to see how people were using the template before I made any decisions on that, since it's not really required for anything as part of the base template.
I can see possibly just using Pundit as the default for Jumpstart at some point. I just wanted to see how people were using the template before I made any decisions on that, since it's not really required for anything as part of the base template.
Notifications
You’re not receiving notifications from this thread.