Advertisement
Guest User

Untitled

a guest
Oct 31st, 2014
132
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. public class AdminAuthorizeAttribute : AuthorizeAttribute
  2. {
  3. public override void OnAuthorization(AuthorizationContext filterContext)
  4. {
  5. // if authorize then continue, or else redirection the action to some page for some user
  6. }
  7. }
  8.  
  9. public class LoggerFilterAttribute : ActionFilterAttribute
  10. {
  11. public override void OnActionExecuting(ActionExecutingContext filterContext)
  12. {
  13. // 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/
  14. }
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement