forked from ddrilling/AsbCloudServer
Миграция на добавление прав для наработки подсистем
This commit is contained in:
parent
1ca9cd85c3
commit
57d5592250
12399
AsbCloudDb/Migrations/20240918081814_Add_Permission_SubsystemStatPlanFact_get.Designer.cs
generated
Normal file
12399
AsbCloudDb/Migrations/20240918081814_Add_Permission_SubsystemStatPlanFact_get.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,38 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace AsbCloudDb.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class Add_Permission_SubsystemStatPlanFact_get : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.InsertData(
|
||||
table: "t_permission",
|
||||
columns: new[] { "id", "description", "name" },
|
||||
values: new object[] { 534, "Разрешение просматривать статистику по плановым и фактическим подсистемам на скважинах", "SubsystemStatPlanFact.get" });
|
||||
|
||||
migrationBuilder.InsertData(
|
||||
table: "t_relation_user_role_permission",
|
||||
columns: new[] { "id_permission", "id_user_role" },
|
||||
values: new object[] { 534, 1 });
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DeleteData(
|
||||
table: "t_relation_user_role_permission",
|
||||
keyColumns: new[] { "id_permission", "id_user_role" },
|
||||
keyValues: new object[] { 534, 1 });
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "t_permission",
|
||||
keyColumn: "id",
|
||||
keyValue: 534);
|
||||
}
|
||||
}
|
||||
}
|
@ -2638,6 +2638,12 @@ namespace AsbCloudDb.Migrations
|
||||
Id = 533,
|
||||
Description = "Разрешение просматривать критические сообщения",
|
||||
Name = "CriticalMessage.get"
|
||||
},
|
||||
new
|
||||
{
|
||||
Id = 534,
|
||||
Description = "Разрешение просматривать статистику по плановым и фактическим подсистемам на скважинах",
|
||||
Name = "SubsystemStatPlanFact.get"
|
||||
});
|
||||
});
|
||||
|
||||
@ -6388,6 +6394,11 @@ namespace AsbCloudDb.Migrations
|
||||
{
|
||||
IdUserRole = 1,
|
||||
IdPermission = 533
|
||||
},
|
||||
new
|
||||
{
|
||||
IdUserRole = 1,
|
||||
IdPermission = 534
|
||||
});
|
||||
});
|
||||
|
||||
|
@ -166,7 +166,8 @@ namespace AsbCloudDb.Model.DefaultData
|
||||
new() { Id = 531, Name = "WellSectionPlan.delete", Description = "Разрешение на удаление плановой конструкции скважины"},
|
||||
|
||||
new() { Id = 532, Name = "Version.get", Description = "Разрешение просматривать информацию о телеметрии"},
|
||||
new() { Id = 533, Name = "CriticalMessage.get", Description = "Разрешение просматривать критические сообщения"}
|
||||
new() { Id = 533, Name = "CriticalMessage.get", Description = "Разрешение просматривать критические сообщения"},
|
||||
new() { Id = 534, Name = "SubsystemStatPlanFact.get", Description = "Разрешение просматривать статистику по плановым и фактическим подсистемам на скважинах"},
|
||||
};
|
||||
}
|
||||
}
|
||||
|
@ -84,7 +84,7 @@ public class SubsystemController : ControllerBase
|
||||
/// получить статистику по плановым и фактическим подсистемам на скважинах
|
||||
/// </summary>
|
||||
[HttpGet("/api/serviceWork/subsystemWells")]
|
||||
[Permission]
|
||||
[Permission("SubsystemStatPlanFact.get")]
|
||||
[ProducesResponseType(typeof(IEnumerable<SubsystemPlanFactStatDto>), (int)System.Net.HttpStatusCode.OK)]
|
||||
public async Task<IActionResult> GetStatPlanFactAsync([FromQuery] SubsystemPlanFactRequest request, CancellationToken token)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user