source: PostgreSqlDotnetCore/Controllers/ErrorController.cs@ 72b1da2

main
Last change on this file since 72b1da2 was 6782104, checked in by ElenaMoskova <elena.moskova99@…>, 6 weeks ago

fix authorization

implement hiding menu items

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