Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class AdminAuthorizeAttribute : AuthorizeAttribute
- {
- public override void OnAuthorization(AuthorizationContext filterContext)
- {
- // if authorize then continue, or else redirection the action to some page for some user
- }
- }
- public class LoggerFilterAttribute : ActionFilterAttribute
- {
- public override void OnActionExecuting(ActionExecutingContext filterContext)
- {
- // before save the access log, I want to know current request is authorized or not, then I can write the authorize status to the access log/
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement