source: PostgreSqlDotnetCore/Controllers/ErrorController.cs@ 6782104

main
Last change on this file since 6782104 was 6782104, checked in by ElenaMoskova <elena.moskova99@…>, 3 months ago

fix authorization

implement hiding menu items

  • Property mode set to 100644
File size: 849 bytes
RevLine 
[2aea0fd]1namespace PostgreSqlDotnetCore.Controllers
2{
3 using Microsoft.AspNetCore.Http;
[6782104]4 using Microsoft.AspNetCore.Identity;
[2aea0fd]5 using Microsoft.AspNetCore.Mvc;
[6782104]6 using System.Threading.Tasks;
[2aea0fd]7
[6782104]8 public class ErrorController : BaseController
[2aea0fd]9 {
[6782104]10 public ErrorController(UserManager<IdentityUser> userManager) : base(userManager)
11 {
12
13 }
[2aea0fd]14 // GET: ErrorController
[6782104]15 public async Task<IActionResult> AccessDeniedAsync()
[2aea0fd]16 {
[6782104]17 // set if is authenticated
18 ViewBag.isAuthenticated = await getCrrentUser();
[2aea0fd]19 return View();
20 }
21 // GET: ErrorController
[6782104]22 public async Task<IActionResult> NotExistAsync()
[2aea0fd]23 {
[6782104]24 // set if is authenticated
25 ViewBag.isAuthenticated = await getCrrentUser();
[2aea0fd]26 return View();
27 }
28
29 }
30}
Note: See TracBrowser for help on using the repository browser.