简体   繁体   中英

Cancancan: set authorization for all controllers

是否可以在不将load_and_authorize_resource放入每个控制器的情况下为所有应用程序设置授权?

Yes you can. See this link

class ApplicationController < ActionController::Base
  check_authorization
end

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