Role-based authorization in Rails
blog.chaps.io
Role-based authorization in Rails
1–10 of 24 posts
Re: Role-based authorization in Rails
#2I think the pattern that needs to be explored is a rails engine that has a web interface to manage permissions for different models. Usually stakeholders want to control the roles and permissions.
Re: Role-based authorization in Rails
#3There's also Rollout:
Re: Role-based authorization in Rails
#4There's also Rollout: https://github.com/FetLife/rollout
That doesn't have anything to do with roles and permissions.
Re: Role-based authorization in Rails
#5I like the approach to describe permissions but I also think that a good data model to sit behind this that includes roles and capabilities ultimately is needed in most applications. Users and use cases will almost always arise that require arbitrary roles with a mix of capabilities...
Re: Role-based authorization in Rails
#6I think the pattern that needs to be explored is a rails engine that has a web interface to manage permissions for different models. Usually stakeholders want to control the roles and permissions.
We were recently working on designing a moderately complicated permissions system, and my impression is that it's impossible to create such a general-purpose engine and gem that covers enough of the cases that you'll have to manage, without creating something that is incredibly complicated to set up and manage. Except for a few standardized domains, you'll always have rules that are easier to express and maintain with some custom, domain-specific code.
Re: Role-based authorization in Rails
#7CanCan + Rolify does exactly what the OP wants.
Re: Role-based authorization in Rails
#8CanCan + Rolify does exactly what the OP wants.
I thought CanCan was abandoned when Rbates took some time off?
https://github.com/ryanb/cancan
Re: Role-based authorization in Rails
#9I've been using Pundit, which is model-based, rather than role-based, and it works really nicely with Rails conventions. Model-based feels more natural than role based, IMO.
Re: Role-based authorization in Rails
#10I do like the access-granted DSL. It seems to address some of CanCan's problems on larger more complex projects. Also... if you prefer a more OO style, I wrote a 50 line authorization lib that has proved workable on some of my larger projects. https://github.com/hopsoft/perm