67 lines
2.2 KiB
C#
67 lines
2.2 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Diagnostics;
|
|
using System.Linq;
|
|
using System.Threading.Tasks;
|
|
using Microsoft.AspNetCore.Mvc;
|
|
using TodoAPI2.Models;
|
|
using STAFF_API.Models;
|
|
using Microsoft.Extensions.Logging;
|
|
using Microsoft.Extensions.Configuration;
|
|
using TodoAPI2.Controllers;
|
|
|
|
namespace TodoAPI2.Controllers
|
|
{
|
|
public class eva_setup_permissionViewController : Controller
|
|
{
|
|
private ILogger<eva_setup_permissionController> _logger;
|
|
private Ieva_setup_permissionService _repository;
|
|
private IConfiguration Configuration { get; set; }
|
|
|
|
/// <summary>
|
|
/// Default constructure for dependency injection
|
|
/// </summary>
|
|
/// <param name="repository"></param>
|
|
/// <param name="configuration"></param>
|
|
/// <param name="logger"></param>
|
|
public eva_setup_permissionViewController(ILogger<eva_setup_permissionController> logger, Ieva_setup_permissionService repository, IConfiguration configuration)
|
|
{
|
|
_logger = logger;
|
|
_repository = repository;
|
|
Configuration = configuration;
|
|
}
|
|
|
|
public IActionResult eva_setup_permission()
|
|
{
|
|
if (!MyHelper.checkAuth(Configuration, HttpContext)) return Unauthorized(); // Or UnauthorizedView
|
|
return View();
|
|
}
|
|
|
|
public IActionResult eva_setup_permission_d()
|
|
{
|
|
if (!MyHelper.checkAuth(Configuration, HttpContext)) return Unauthorized(); // Or UnauthorizedView
|
|
return View();
|
|
}
|
|
|
|
//public IActionResult eva_setup_permission_report()
|
|
//{
|
|
// if (!MyHelper.checkAuth(Configuration, HttpContext)) return Unauthorized(); // Or UnauthorizedView
|
|
// return View();
|
|
//}
|
|
|
|
//public IActionResult eva_setup_permission_inline()
|
|
//{
|
|
// if (!MyHelper.checkAuth(Configuration, HttpContext)) return Unauthorized(); // Or UnauthorizedView
|
|
// return View();
|
|
//}
|
|
|
|
[ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)]
|
|
public IActionResult Error()
|
|
{
|
|
return View(new ErrorViewModel { RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier });
|
|
}
|
|
}
|
|
}
|
|
|
|
|