是否有办法在特定区域的特定控制器中将谓词构建为具有特定名称的操作列表?
答案 0 :(得分:1)
如果区域控制器位于特定于该区域的命名空间中,您应该能够使用以下内容:
configuration.ForActionsMatching(info =>
info.ControllerType.Namespace.StartsWith("Some.Namespace")
)
https://github.com/kristofferahl/FluentSecurity/wiki/Securing-controllers
如果您所在的区域不在运行FluentSecurity的应用程序的引用中,那么您应该查看FluentSecurity 2.0中的“个人档案”。
https://github.com/kristofferahl/FluentSecurity/wiki/Profiles