init
This commit is contained in:
commit
e124a47765
19374 changed files with 9806149 additions and 0 deletions
24
KretaWeb/Security/ApiCsokkentettGondviseloAccessAttribute.cs
Normal file
24
KretaWeb/Security/ApiCsokkentettGondviseloAccessAttribute.cs
Normal file
|
@ -0,0 +1,24 @@
|
|||
using System.Net;
|
||||
using System.Net.Http;
|
||||
using System.Web.Http.Controllers;
|
||||
using System.Web.Http.Filters;
|
||||
using Kreta.BusinessLogic.Helpers.SystemSettings;
|
||||
using Kreta.Web.Helpers;
|
||||
|
||||
namespace Kreta.Web.Security
|
||||
{
|
||||
public class ApiCsokkentettGondviseloAccessAttribute : ActionFilterAttribute
|
||||
{
|
||||
public ApiCsokkentettGondviseloAccessAttribute() { }
|
||||
|
||||
public override void OnActionExecuting(HttpActionContext actionContext)
|
||||
{
|
||||
var result = new SystemSettingsHelper(ConnectionTypeExtensions.GetOrganizationConnectionType()).GetSystemSettingValue<bool>(Enums.RendszerBeallitasTipusEnum.Csokkentett_gondviselok_kezelese);
|
||||
|
||||
if (!result)
|
||||
{
|
||||
actionContext.Response = new HttpResponseMessage(HttpStatusCode.Unauthorized);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue