forked from ddrilling/AsbCloudServer
Merge branch 'dev' of http://test.digitaldrilling.ru:8080/DDrilling/AsbCloudServer into dev
This commit is contained in:
commit
bb8b530cbf
8158
AsbCloudDb/Migrations/20230628043716_Add_Permissions_WellContact.Designer.cs
generated
Normal file
8158
AsbCloudDb/Migrations/20230628043716_Add_Permissions_WellContact.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,34 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace AsbCloudDb.Migrations
|
||||
{
|
||||
public partial class Add_Permissions_WellContact : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.InsertData(
|
||||
table: "t_permission",
|
||||
columns: new[] { "id", "description", "name" },
|
||||
values: new object[,]
|
||||
{
|
||||
{ 519, "Разрешение просматривать список контактов", "WellContact.get" },
|
||||
{ 520, "Разрешение редактировать список контактов", "WellContact.edit" }
|
||||
});
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DeleteData(
|
||||
table: "t_permission",
|
||||
keyColumn: "id",
|
||||
keyValue: 519);
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "t_permission",
|
||||
keyColumn: "id",
|
||||
keyValue: 520);
|
||||
}
|
||||
}
|
||||
}
|
@ -2002,6 +2002,18 @@ namespace AsbCloudDb.Migrations
|
||||
Id = 518,
|
||||
Description = "Разрешение удалять вопрос",
|
||||
Name = "FaqStatistics.delete"
|
||||
},
|
||||
new
|
||||
{
|
||||
Id = 519,
|
||||
Description = "Разрешение просматривать список контактов",
|
||||
Name = "WellContact.get"
|
||||
},
|
||||
new
|
||||
{
|
||||
Id = 520,
|
||||
Description = "Разрешение редактировать список контактов",
|
||||
Name = "WellContact.edit"
|
||||
});
|
||||
});
|
||||
|
||||
@ -3569,6 +3581,16 @@ namespace AsbCloudDb.Migrations
|
||||
{
|
||||
IdUserRole = 1,
|
||||
IdPermission = 518
|
||||
},
|
||||
new
|
||||
{
|
||||
IdUserRole = 1,
|
||||
IdPermission = 519
|
||||
},
|
||||
new
|
||||
{
|
||||
IdUserRole = 1,
|
||||
IdPermission = 520
|
||||
});
|
||||
});
|
||||
|
||||
|
@ -149,6 +149,9 @@
|
||||
new (){ Id = 516, Name="FaqStatistics.get", Description="Разрешение просматривать статистику вопросов"},
|
||||
new (){ Id = 517, Name="FaqStatistics.edit", Description="Разрешение редактировать вопрос"},
|
||||
new (){ Id = 518, Name="FaqStatistics.delete", Description="Разрешение удалять вопрос"},
|
||||
|
||||
new (){ Id = 519, Name="WellContact.get", Description="Разрешение просматривать список контактов"},
|
||||
new (){ Id = 520, Name="WellContact.edit", Description="Разрешение редактировать список контактов"},
|
||||
};
|
||||
}
|
||||
}
|
||||
|
@ -95,7 +95,7 @@ namespace AsbCloudInfrastructure.Services.SAUB
|
||||
{
|
||||
var entity = GetTelemetryCache()
|
||||
.FirstOrDefault(t => t.Well?.Id == idWell);
|
||||
if (entity.Well?.Timezone is not null && entity.TimeZone.Hours != entity.Well.Timezone.Hours)
|
||||
if (entity?.Well?.Timezone is not null && entity.TimeZone.Hours != entity.Well.Timezone.Hours)
|
||||
{
|
||||
entity.TimeZone = entity.Well.Timezone;
|
||||
//TODO: выдаем предупреждение!
|
||||
|
@ -1,5 +1,4 @@
|
||||
using AsbCloudApp.Data;
|
||||
using AsbCloudApp.Data.User;
|
||||
using AsbCloudApp.Services;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
|
@ -1,7 +1,6 @@
|
||||
using AsbCloudApp.Exceptions;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace AsbCloudWebApi.Middlewares
|
||||
@ -36,12 +35,15 @@ namespace AsbCloudWebApi.Middlewares
|
||||
context.Response.Clear();
|
||||
context.Response.StatusCode = 403;
|
||||
}
|
||||
catch (TaskCanceledException ex)
|
||||
catch (OperationCanceledException ex)
|
||||
{
|
||||
Console.WriteLine(ex.Message);
|
||||
}
|
||||
catch (Exception ex) // TODO: find explicit exception. Use Trace. Add body size to message.
|
||||
{
|
||||
context.Response.Clear();
|
||||
context.Response.StatusCode = 500;
|
||||
|
||||
if (ex.Message.Contains("Reading the request body timed out due to data arriving too slowly. See MinRequestBodyDataRate."))
|
||||
Console.WriteLine("Reading the request body timed out due to data arriving too slowly.");
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user