Enable permissions middleware

This commit is contained in:
Фролов 2022-01-31 11:06:36 +05:00
parent eaf7cb85b2
commit 366a61cae5
2 changed files with 1 additions and 3 deletions

View File

@ -72,8 +72,6 @@ namespace AsbCloudWebApi.Middlewares
isAuthorized = userService.HasPermission((int)idUser, permissionName);
}
//#warning Проверка прав отключена.
// isAuthorized = true;
if (isAuthorized)
await next?.Invoke(context);
else

View File

@ -91,7 +91,7 @@ namespace AsbCloudWebApi
app.UseAuthentication();
app.UseAuthorization();
// app.UseMiddleware<PermissionsMiddlware>();
app.UseMiddleware<PermissionsMiddlware>();
app.UseMiddleware<SimplifyExceptionsMiddleware>();
app.UseMiddleware<RequerstTrackerMiddleware>();