Merge branch 'main' of ssh://git.ma-al.com:8822/goc_daniel/b2b into storage
This commit is contained in:
@@ -79,7 +79,7 @@ func AuthMiddleware() fiber.Handler {
|
||||
}
|
||||
|
||||
// We now populate the target user
|
||||
if user.Role != model.RoleAdmin {
|
||||
if model.CustomerRole(user.Role.Name) != model.RoleAdmin {
|
||||
return c.Status(fiber.StatusForbidden).JSON(fiber.Map{
|
||||
"error": "admin access required",
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user