- Timestamp:
- 08/23/24 03:03:32 (3 months ago)
- Branches:
- main
- Children:
- 118e414
- Parents:
- 57fc402
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
PostgreSqlDotnetCore/Controllers/VetCenterController.cs
r57fc402 r72b1da2 31 31 } 32 32 33 /* public async Task<ActionResult> Index() 34 { 35 36 var vetCenters = await db.VetCentersObj.ToListAsync(); 37 ViewBag.isAuthenticated = User.Identity.IsAuthenticated; 38 39 // Check if the user is an admin 40 UsersClass customerClass = await checkAuthorizationSpecificRoleAsync(RoleConstants.Admin); 41 ViewBag.hasAccess = customerClass != null; 42 43 return View(vetCenters); 44 }*/ 33 45 public async Task<ActionResult> Index() 34 46 { … … 36 48 ViewBag.isAuthenticated = User.Identity.IsAuthenticated; 37 49 38 // Check if the user is an admin50 // Проверете дали корисникот е администратор или менаџер 39 51 UsersClass customerClass = await checkAuthorizationSpecificRoleAsync(RoleConstants.Admin); 52 // ?? await checkAuthorizationSpecificRoleAsync(RoleConstants.Manager); 53 40 54 ViewBag.hasAccess = customerClass != null; 41 55 42 56 return View(vetCenters); 43 57 } 58 44 59 45 60 public async Task<ActionResult> Details(int? id) … … 124 139 } 125 140 126 public async Task<ActionResult> Delete(int? id) 127 { 141 public async Task<ActionResult> Delete(int? id) { 142 UsersClass customerClass = await checkAuthorizationAsync(); 143 144 ViewBag.isAuthenticated = await getCrrentUser(); 145 128 146 if (id == null) 129 147 {
Note:
See TracChangeset
for help on using the changeset viewer.