init
This commit is contained in:
commit
e124a47765
19374 changed files with 9806149 additions and 0 deletions
34
KretaWeb/Areas/KirImportExport/Controllers/BaseController.cs
Normal file
34
KretaWeb/Areas/KirImportExport/Controllers/BaseController.cs
Normal file
|
@ -0,0 +1,34 @@
|
|||
using System.Web.Mvc;
|
||||
using Kreta.BusinessLogic.Security;
|
||||
using Kreta.Core;
|
||||
using Kreta.Core.KIR.Domain.Model;
|
||||
using Kreta.Web.Areas.KirImportExport.Models.KirImport;
|
||||
using Kreta.Web.Security;
|
||||
|
||||
namespace Kreta.Web.Areas.KirImportExport.Controllers
|
||||
{
|
||||
[MvcRoleClaimsAuthorize(true)]
|
||||
[MvcRolePackageAuthorize(KretaClaimPackages.Adminisztrator.ClaimValue)]
|
||||
public abstract class BaseController : Controller
|
||||
{
|
||||
public ActionResult IndexImport()
|
||||
{
|
||||
if (!(Cache.Get($"{ClaimData.FelhasznaloNev}_{ClaimData.FelhasznaloId}_{ClaimData.IntezmenyAzonosito}_KirLogin") is AuthHeaderModel))
|
||||
{
|
||||
return View("~/Areas/KirImportExport/Views/Shared/_KirLogin.cshtml", new KirLoginModel { Url = HttpContext.Request.Url.AbsoluteUri });
|
||||
}
|
||||
|
||||
return View("IndexImport", new KirSearchModel());
|
||||
}
|
||||
|
||||
public ActionResult IndexExport()
|
||||
{
|
||||
if (!(Cache.Get($"{ClaimData.FelhasznaloNev}_{ClaimData.FelhasznaloId}_{ClaimData.IntezmenyAzonosito}_KirLogin") is AuthHeaderModel) && string.IsNullOrWhiteSpace(Cache.Get($"{ClaimData.FelhasznaloNev}_{ClaimData.FelhasznaloId}_{ClaimData.IntezmenyAzonosito}_KirToken") as string))
|
||||
{
|
||||
return View("~/Areas/KirImportExport/Views/Shared/_KirLogin.cshtml", new KirLoginModel { Url = HttpContext.Request.Url.AbsoluteUri });
|
||||
}
|
||||
|
||||
return View("IndexExport", new KirSearchModel());
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue