简体   繁体   中英

ForActionsMatching an area and controller name?

有没有一种方法可以在特定控制器,特定区域,特定名称的谓词下构建谓词?

If you're area controllers are in a namespace specific to that area, you should be able to use the following:

configuration.ForActionsMatching(info =>
   info.ControllerType.Namespace.StartsWith("Some.Namespace")
)

https://github.com/kristofferahl/FluentSecurity/wiki/Securing-controllers

If you're areas are in an assembly not reference by the application running FluentSecurity, you should have a look at Profiles in FluentSecurity 2.0.

https://github.com/kristofferahl/FluentSecurity/wiki/Profiles

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