small fix
This commit is contained in:
@@ -45,7 +45,7 @@ func (h *MeiliSearchHandler) CreateIndex(c fiber.Ctx) error {
|
||||
}
|
||||
|
||||
userRole, ok := localeExtractor.GetOriginalUserRole(c)
|
||||
if !ok || userRole != model.RoleAdmin {
|
||||
if !ok || model.CustomerRole(userRole.Name) != model.RoleAdmin {
|
||||
return c.Status(responseErrors.GetErrorStatus(responseErrors.ErrAdminAccessRequired)).
|
||||
JSON(response.Make(nullable.GetNil(""), 0, responseErrors.GetErrorCode(c, responseErrors.ErrAdminAccessRequired)))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user