Ignore:
Timestamp:
08/20/24 23:14:03 (3 months ago)
Author:
ElenaMoskova <elena.moskova99@…>
Branches:
main
Children:
57fc402
Parents:
63bd770
Message:

Аccess permission

File:
1 edited

Legend:

Unmodified
Added
Removed
  • PostgreSqlDotnetCore/Controllers/CityController.cs

    r63bd770 rd6040ef  
    1616        // GET: Customer
    1717        public async Task<ActionResult> IndexAsync()
    18         {
    19             // check for permission
    20             UsersClass customerClass = await checkAuthorizationAsync();
    21             if (customerClass == null)
    22             {
    23                 return RedirectToAction("AccessDenied", "Error");
    24             }
    25             //return View(Enumerable.Empty<UsersClass>());
    26             return View(db.CitiesObj.ToList());
    27         }
     18         {
     19             // check for permission
     20             UsersClass customerClass = await checkAuthorizationAsync();
     21             if (customerClass == null)
     22             {
     23                 return RedirectToAction("AccessDenied", "Error");
     24             }
     25             //return View(Enumerable.Empty<UsersClass>());
     26             return View(db.CitiesObj.ToList());
     27         }
     28       
     29
    2830
    2931        // GET: Customer/Details/5
Note: See TracChangeset for help on using the changeset viewer.