Ignore:
Timestamp:
08/20/24 16:13:49 (3 months ago)
Author:
ElenaMoskova <elena.moskova99@…>
Branches:
main
Children:
63bd770
Parents:
8f8226c
Message:

fix authorization

implement hiding menu items

File:
1 edited

Legend:

Unmodified
Added
Removed
  • PostgreSqlDotnetCore/Controllers/ErrorController.cs

    r8f8226c r6782104  
    22{
    33    using Microsoft.AspNetCore.Http;
     4    using Microsoft.AspNetCore.Identity;
    45    using Microsoft.AspNetCore.Mvc;
     6    using System.Threading.Tasks;
    57
    6     public class ErrorController : Controller
     8    public class ErrorController : BaseController
    79    {
     10        public ErrorController(UserManager<IdentityUser> userManager) : base(userManager)
     11        {
     12
     13        }
    814        // GET: ErrorController
    9         public IActionResult AccessDenied()
     15        public async Task<IActionResult> AccessDeniedAsync()
    1016        {
     17            // set if is authenticated
     18            ViewBag.isAuthenticated = await getCrrentUser();
    1119            return View();
    1220        }
    1321        // GET: ErrorController
    14         public IActionResult NotExist()
     22        public async Task<IActionResult> NotExistAsync()
    1523        {
     24            // set if is authenticated
     25            ViewBag.isAuthenticated = await getCrrentUser();
    1626            return View();
    1727        }
Note: See TracChangeset for help on using the changeset viewer.