Managing Users Role Access

20 views
Skip to first unread message

Ciprian Dunareanu

unread,
Oct 8, 2017, 8:23:52 AM10/8/17
to Refinery CMS
Hi all,

In my refinery app I've enabled role assignment for users by adding
config.superuser_can_assign_roles = true
to the Devise configuration.

My question is if there is any built-in GUI for managing roles (eg. adding new ones, besides refinery and superuser)?

Cheers. 

Philip Arndt

unread,
Oct 11, 2017, 1:27:55 AM10/11/17
to refine...@googlegroups.com
No, roles have to be added in code before they'll show up in the admin interface. This is because without being specified in code they don't relate to anything.

Ciprian Dunareanu

unread,
Oct 11, 2017, 3:58:20 PM10/11/17
to refine...@googlegroups.com
That is true.
In fact, I guess roles could have been managed via config instead.

Anyways, here's how to create a new role by code:

Refinery::Authentication::Devise::Role.new(title: "My New Role").save


On Wed, Oct 11, 2017 at 8:27 AM, Philip Arndt <par...@gmail.com> wrote:
No, roles have to be added in code before they'll show up in the admin interface.  This is because without being specified in code they don't relate to anything.

--
You received this message because you are subscribed to the "Refinery CMS" Google Group.
To post to this group, send email to refine...@googlegroups.com

http://www.refinerycms.com
---
You received this message because you are subscribed to the Google Groups "Refinery CMS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to refinery-cms+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/refinery-cms/309B74E1-79E7-4AB7-B42D-3746A7329430%40gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages