简体   繁体   中英

declarative_authorization and namespaces

Do you know - can declarative_authorization control access to namespace'd resources or not? I've tried something like

has_permission_on [:admin, :users], :to => [:index, :show, :new, :create, :edit, :update, :destroy, :search]

but it's not working :( any ideas on this?

This will work:

has_permission_on :admin_users, :to => [:index, :show, :new, :create, :edit, :update, :destroy, :search]

declarative_authorization prefixes the resource name with the namespace as [:admin, :users] could also mean that the user has permission on the admin_controller and the users_controller .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM