- Timestamp:
- 08/23/24 15:40:14 (2 months ago)
- Branches:
- main
- Children:
- e9bb9d1
- Parents:
- 72b1da2
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
PostgreSqlDotnetCore/Controllers/VetCenterController.cs
r72b1da2 r118e414 23 23 return RedirectToAction("AccessDenied", "Error"); 24 24 } 25 // no access for standard user 26 ViewBag.OnlyAdminManager = await checkAuthorizationSpecificRoleAsync(RoleConstants.Admin) ?? await checkAuthorizationSpecificRoleAsync(RoleConstants.Manager); 25 27 26 28 // Fetch cities for dropdown … … 47 49 var vetCenters = await db.VetCentersObj.ToListAsync(); 48 50 ViewBag.isAuthenticated = User.Identity.IsAuthenticated; 51 // no access for standard user 52 ViewBag.OnlyAdminManager = await checkAuthorizationSpecificRoleAsync(RoleConstants.Admin) ?? await checkAuthorizationSpecificRoleAsync(RoleConstants.Manager); 49 53 50 54 // Проверете дали корисникот е администратор или менаџер … … 66 70 67 71 VetCenter vetClass = await db.VetCentersObj.FindAsync(id); 72 UsersClass customerClass = await getCrrentUser(); 73 ViewBag.isAuthenticated = customerClass; 68 74 if (vetClass == null) 69 75 { 70 76 return RedirectToAction("NotExist", "Error"); 71 77 } 78 // no access for standard user 79 ViewBag.OnlyAdminManager = await checkAuthorizationSpecificRoleAsync(RoleConstants.Admin) ?? await checkAuthorizationSpecificRoleAsync(RoleConstants.Manager); 72 80 73 81 return View(vetClass); … … 113 121 return RedirectToAction("AccessDenied", "Error"); 114 122 } 123 ViewBag.OnlyAdminManager = await checkAuthorizationSpecificRoleAsync(RoleConstants.Admin) ?? await checkAuthorizationSpecificRoleAsync(RoleConstants.Manager); 124 115 125 116 126 // Fetch cities for dropdown … … 154 164 return RedirectToAction("NotExist", "Error"); 155 165 } 166 ViewBag.OnlyAdminManager = await checkAuthorizationSpecificRoleAsync(RoleConstants.Admin) ?? await checkAuthorizationSpecificRoleAsync(RoleConstants.Manager); 167 156 168 157 169 return View(vetClass);
Note:
See TracChangeset
for help on using the changeset viewer.