﻿using System.Web;
using System.Web.Mvc;
using FluentSecurity;

namespace UILWeb
{
  public class PolicyViolationExceptionHandler : IPolicyViolationHandler
  {
    public ActionResult Handle(PolicyViolationException exception)
    {
      // Lanzamos un error de acceso denegado.
      throw new HttpException(401, "Acceso denegado");
    }
  }
}