How could I implement the permit directive through database in rails-authorization-plugin, in a way that an admin user can change? -


I would like to control the permit method with something like this

class SomethingController & lt; ApplicationController Permission: somerole end

Where ': somerole' is a field and an action in the database connected to a controller. Something that the user can administer and change with personalized.

Some thoughts?

This is just for example I

  class admin: AdminController & lt; ApplicationController before_filter: login_required before_filter: only_moderator_and_above layout 'admin' def only_moderator_and_above until current_user.has_admin_access? Flash [: notice] = custom message Admin_permission_alert redirect_to '/' End End End  

Comments

Popular posts from this blog

c# - How to capture HTTP packet with SharpPcap -

jquery - SimpleModal Confirm fails to submit form -

php - Multiple Select with Explode: only returns the word "Array" -