private static void ValidateAction(UpdateActionDescriptor updateAction) { // Only authorization filters are supported on CUD actions. This will capture 99% of user errors. // There is the chance that someone might attempt to implement an attribute that implements both // IAuthorizationFilter AND another filter type, but we don't want to have a black-list of filter // types here. if (updateAction.GetFilters().Any(p => !typeof(AuthorizationFilterAttribute).IsAssignableFrom(p.GetType()))) { throw Error.NotSupported(Resource.InvalidAction_UnsupportedFilterType, updateAction.ControllerDescriptor.ControllerType.Name, updateAction.ActionName); } }
private static void ValidateAction(UpdateActionDescriptor updateAction) { // Only authorization filters are supported on CUD actions. This will capture 99% of user errors. // There is the chance that someone might attempt to implement an attribute that implements both // IAuthorizationFilter AND another filter type, but we don't want to have a black-list of filter // types here. if (updateAction.GetFilters().Any(p => !typeof(AuthorizationFilterAttribute).IsAssignableFrom(p.GetType()))) { throw Error.NotSupported(Resource.InvalidAction_UnsupportedFilterType, updateAction.ControllerDescriptor.ControllerType.Name, updateAction.ActionName); } }