Добавлено новое разрешение

This commit is contained in:
Степанов Дмитрий 2024-08-21 14:53:00 +05:00
parent 004b772503
commit cdaae721be
4 changed files with 12429 additions and 1 deletions

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,38 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace AsbCloudDb.Migrations
{
/// <inheritdoc />
public partial class Add_New_Permission : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.InsertData(
table: "t_permission",
columns: new[] { "id", "description", "name" },
values: new object[] { 532, "Разрешение просматривать информацию о телеметрии", "TelemetryInfo.get" });
migrationBuilder.InsertData(
table: "t_relation_user_role_permission",
columns: new[] { "id_permission", "id_user_role" },
values: new object[] { 532, 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[] { 532, 1 });
migrationBuilder.DeleteData(
table: "t_permission",
keyColumn: "id",
keyValue: 532);
}
}
}

View File

@ -2626,6 +2626,12 @@ namespace AsbCloudDb.Migrations
Id = 531,
Description = "Разрешение на удаление плановой конструкции скважины",
Name = "WellSectionPlan.delete"
},
new
{
Id = 532,
Description = "Разрешение просматривать информацию о телеметрии",
Name = "TelemetryInfo.get"
});
});
@ -6366,6 +6372,11 @@ namespace AsbCloudDb.Migrations
{
IdUserRole = 1,
IdPermission = 531
},
new
{
IdUserRole = 1,
IdPermission = 532
});
});

View File

@ -163,7 +163,9 @@ namespace AsbCloudDb.Model.DefaultData
new() { Id = 528, Name = "WellContact.delete", Description = "Разрешение на удаление контакта" },
new() { Id = 530, Name = "WellSectionPlan.edit", Description = "Разрешение на редактирование плановой конструкции скважины"},
new() { Id = 531, Name = "WellSectionPlan.delete", Description = "Разрешение на удаление плановой конструкции скважины"}
new() { Id = 531, Name = "WellSectionPlan.delete", Description = "Разрешение на удаление плановой конструкции скважины"},
new() { Id = 532, Name = "TelemetryInfo.get", Description = "Разрешение просматривать информацию о телеметрии"}
};
}
}