你知道吗-- declarative_authorization能控制对命名空间资源的访问吗?我试过像这样的东西
has_permission_on [:admin, :users], :to => [:index, :show, :new, :create, :edit, :update, :destroy, :search]但它不起作用:(对此有什么想法?
发布于 2010-06-20 19:55:04
这将会起作用:
has_permission_on :admin_users, :to => [:index, :show, :new, :create, :edit, :update, :destroy, :search]declarative_authorization为资源名称加上名称空间前缀[:admin, :users]也可能意味着用户对admin_controller和users_controller具有权限。
https://stackoverflow.com/questions/3079035
复制相似问题