开发者

Using Administration Dashboard with Declarative Authorization and Authlogic?

开发者 https://www.devze.com 2022-12-24 00:40 出处:网络
I use Declarative Authorization and Authlogic and now wants to create a dashboard for the administration. About ActiveScaffold will be an overview of the different controllers are shown.

I use Declarative Authorization and Authlogic and now wants to create a dashboard for the administration. About ActiveScaffold will be an overview of the different controllers are shown.

However, I have the problem that I can admin no "admin rights" to the subfolders app/controllers/admin/admin_controller. How can I do that?

Currently my Authorization_rules.rb looks like this:

authorization do
    role :admin do
      includes :guest
      ha开发者_如何学Pythons_permission_on :admin,     :to => [:index]
    end
end

But that does not work! Can someone help me? Thanks


I solve this some minutes later. If you want to add rules for subfolders you must something like this: rule for admin/admin_controller:

role :admin do 
  has_permissions_on :admin_admin, :to=>[:index] 
end 
0

精彩评论

暂无评论...
验证码 换一张
取 消