init
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
using System.Net;
|
||||
using System.Web;
|
||||
using System.Web.Mvc;
|
||||
using Kreta.BusinessLogic.Helpers.SystemSettings;
|
||||
using Kreta.Web.Helpers;
|
||||
|
||||
namespace Kreta.Web.Security
|
||||
{
|
||||
public class MvcCsokkentettGondviseloAccessAttribute : ActionFilterAttribute
|
||||
{
|
||||
public MvcCsokkentettGondviseloAccessAttribute() { }
|
||||
|
||||
public override void OnActionExecuting(ActionExecutingContext filterContext)
|
||||
{
|
||||
var result = new SystemSettingsHelper(ConnectionTypeExtensions.GetOrganizationConnectionType()).GetSystemSettingValue<bool>(Enums.RendszerBeallitasTipusEnum.Csokkentett_gondviselok_kezelese);
|
||||
|
||||
if (!result)
|
||||
{
|
||||
filterContext.Result = new EmptyResult();
|
||||
HttpContext.Current.Response.StatusCode = (int)HttpStatusCode.Unauthorized;
|
||||
HttpContext.Current.Response.End();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user