Managing Users Role Access

瀏覽次數:21 次
跳到第一則未讀訊息

Ciprian Dunareanu

未讀,
2017年10月8日 上午8:23:522017/10/8
收件者: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

未讀,
2017年10月11日 凌晨1:27:552017/10/11
收件者: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

未讀,
2017年10月11日 下午3:58:202017/10/11
收件者: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.

回覆所有人
回覆作者
轉寄
0 則新訊息