是否有一种方法可以将谓词构建为具有特定名称、特定控制器、特定区域中的操作列表?
发布于 2013-11-07 13:43:11
如果您所在的区域控制器位于特定于该区域的命名空间中,则应该能够使用以下内容:
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
https://stackoverflow.com/questions/19797290
复制相似问题