forked from ddrilling/AsbCloudServer
Enable permissions middleware
This commit is contained in:
parent
eaf7cb85b2
commit
366a61cae5
@ -72,8 +72,6 @@ namespace AsbCloudWebApi.Middlewares
|
||||
isAuthorized = userService.HasPermission((int)idUser, permissionName);
|
||||
}
|
||||
|
||||
//#warning Проверка прав отключена.
|
||||
// isAuthorized = true;
|
||||
if (isAuthorized)
|
||||
await next?.Invoke(context);
|
||||
else
|
||||
|
@ -91,7 +91,7 @@ namespace AsbCloudWebApi
|
||||
app.UseAuthentication();
|
||||
app.UseAuthorization();
|
||||
|
||||
// app.UseMiddleware<PermissionsMiddlware>();
|
||||
app.UseMiddleware<PermissionsMiddlware>();
|
||||
app.UseMiddleware<SimplifyExceptionsMiddleware>();
|
||||
app.UseMiddleware<RequerstTrackerMiddleware>();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user