Add root auto-permission

This commit is contained in:
ngfrolov 2023-03-07 15:33:06 +05:00
parent 1ca72d50d1
commit fb128c0eb1
Signed by: ng.frolov
GPG Key ID: E99907A0357B29A7
5 changed files with 9243 additions and 56 deletions

View File

@ -24,6 +24,6 @@ namespace AsbCloudApp.Data
/// <summary>
/// Название типа компании
/// </summary>
public string CompanyTypeCaption { get; set; } = null!;
public string? CompanyTypeCaption { get; set; }
}
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,757 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace AsbCloudDb.Migrations
{
public partial class Add_new_permissions_for_root : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
string sql = @"INSERT INTO t_relation_user_role_permission (id_user_role, id_permission) values
(1, 100),
(1, 101),
(1, 102),
(1, 103),
(1, 104),
(1, 105),
(1, 106),
(1, 107),
(1, 108),
(1, 109),
(1, 110),
(1, 111),
(1, 112),
(1, 113),
(1, 114),
(1, 115),
(1, 116),
(1, 117),
(1, 118),
(1, 119),
(1, 120),
(1, 121),
(1, 122),
(1, 123),
(1, 124),
(1, 125),
(1, 126),
(1, 127),
(1, 128),
(1, 129),
(1, 200),
(1, 201),
(1, 202),
(1, 203),
(1, 204),
(1, 205),
(1, 206),
(1, 207),
(1, 208),
(1, 209),
(1, 210),
(1, 211),
(1, 212),
(1, 213),
(1, 214),
(1, 215),
(1, 216),
(1, 217),
(1, 218),
(1, 219),
(1, 220),
(1, 221),
(1, 222),
(1, 223),
(1, 224),
(1, 225),
(1, 226),
(1, 227),
(1, 228),
(1, 229),
(1, 230),
(1, 231),
(1, 232),
(1, 233),
(1, 234),
(1, 235),
(1, 236),
(1, 237),
(1, 238),
(1, 239),
(1, 240),
(1, 241),
(1, 242),
(1, 243),
(1, 244),
(1, 245),
(1, 246),
(1, 247),
(1, 248),
(1, 249),
(1, 250),
(1, 251),
(1, 252),
(1, 253),
(1, 254),
(1, 255),
(1, 256),
(1, 257),
(1, 258),
(1, 259),
(1, 260),
(1, 261),
(1, 262),
(1, 263),
(1, 264),
(1, 265),
(1, 266),
(1, 267),
(1, 268),
(1, 269),
(1, 380),
(1, 381),
(1, 382),
(1, 383),
(1, 384),
(1, 385),
(1, 386),
(1, 387),
(1, 388),
(1, 389),
(1, 390),
(1, 391),
(1, 400),
(1, 401),
(1, 407),
(1, 408),
(1, 450),
(1, 460),
(1, 461),
(1, 507),
(1, 513),
(1, 514),
(1, 515)
ON CONFLICT DO NOTHING;";
migrationBuilder.Sql(sql);
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DeleteData(
table: "t_relation_user_role_permission",
keyColumns: new[] { "id_permission", "id_user_role" },
keyValues: new object[] { 100, 1 });
migrationBuilder.DeleteData(
table: "t_relation_user_role_permission",
keyColumns: new[] { "id_permission", "id_user_role" },
keyValues: new object[] { 101, 1 });
migrationBuilder.DeleteData(
table: "t_relation_user_role_permission",
keyColumns: new[] { "id_permission", "id_user_role" },
keyValues: new object[] { 102, 1 });
migrationBuilder.DeleteData(
table: "t_relation_user_role_permission",
keyColumns: new[] { "id_permission", "id_user_role" },
keyValues: new object[] { 103, 1 });
migrationBuilder.DeleteData(
table: "t_relation_user_role_permission",
keyColumns: new[] { "id_permission", "id_user_role" },
keyValues: new object[] { 104, 1 });
migrationBuilder.DeleteData(
table: "t_relation_user_role_permission",
keyColumns: new[] { "id_permission", "id_user_role" },
keyValues: new object[] { 105, 1 });
migrationBuilder.DeleteData(
table: "t_relation_user_role_permission",
keyColumns: new[] { "id_permission", "id_user_role" },
keyValues: new object[] { 106, 1 });
migrationBuilder.DeleteData(
table: "t_relation_user_role_permission",
keyColumns: new[] { "id_permission", "id_user_role" },
keyValues: new object[] { 107, 1 });
migrationBuilder.DeleteData(
table: "t_relation_user_role_permission",
keyColumns: new[] { "id_permission", "id_user_role" },
keyValues: new object[] { 108, 1 });
migrationBuilder.DeleteData(
table: "t_relation_user_role_permission",
keyColumns: new[] { "id_permission", "id_user_role" },
keyValues: new object[] { 109, 1 });
migrationBuilder.DeleteData(
table: "t_relation_user_role_permission",
keyColumns: new[] { "id_permission", "id_user_role" },
keyValues: new object[] { 110, 1 });
migrationBuilder.DeleteData(
table: "t_relation_user_role_permission",
keyColumns: new[] { "id_permission", "id_user_role" },
keyValues: new object[] { 111, 1 });
migrationBuilder.DeleteData(
table: "t_relation_user_role_permission",
keyColumns: new[] { "id_permission", "id_user_role" },
keyValues: new object[] { 112, 1 });
migrationBuilder.DeleteData(
table: "t_relation_user_role_permission",
keyColumns: new[] { "id_permission", "id_user_role" },
keyValues: new object[] { 113, 1 });
migrationBuilder.DeleteData(
table: "t_relation_user_role_permission",
keyColumns: new[] { "id_permission", "id_user_role" },
keyValues: new object[] { 114, 1 });
migrationBuilder.DeleteData(
table: "t_relation_user_role_permission",
keyColumns: new[] { "id_permission", "id_user_role" },
keyValues: new object[] { 115, 1 });
migrationBuilder.DeleteData(
table: "t_relation_user_role_permission",
keyColumns: new[] { "id_permission", "id_user_role" },
keyValues: new object[] { 116, 1 });
migrationBuilder.DeleteData(
table: "t_relation_user_role_permission",
keyColumns: new[] { "id_permission", "id_user_role" },
keyValues: new object[] { 117, 1 });
migrationBuilder.DeleteData(
table: "t_relation_user_role_permission",
keyColumns: new[] { "id_permission", "id_user_role" },
keyValues: new object[] { 118, 1 });
migrationBuilder.DeleteData(
table: "t_relation_user_role_permission",
keyColumns: new[] { "id_permission", "id_user_role" },
keyValues: new object[] { 119, 1 });
migrationBuilder.DeleteData(
table: "t_relation_user_role_permission",
keyColumns: new[] { "id_permission", "id_user_role" },
keyValues: new object[] { 120, 1 });
migrationBuilder.DeleteData(
table: "t_relation_user_role_permission",
keyColumns: new[] { "id_permission", "id_user_role" },
keyValues: new object[] { 121, 1 });
migrationBuilder.DeleteData(
table: "t_relation_user_role_permission",
keyColumns: new[] { "id_permission", "id_user_role" },
keyValues: new object[] { 122, 1 });
migrationBuilder.DeleteData(
table: "t_relation_user_role_permission",
keyColumns: new[] { "id_permission", "id_user_role" },
keyValues: new object[] { 123, 1 });
migrationBuilder.DeleteData(
table: "t_relation_user_role_permission",
keyColumns: new[] { "id_permission", "id_user_role" },
keyValues: new object[] { 124, 1 });
migrationBuilder.DeleteData(
table: "t_relation_user_role_permission",
keyColumns: new[] { "id_permission", "id_user_role" },
keyValues: new object[] { 125, 1 });
migrationBuilder.DeleteData(
table: "t_relation_user_role_permission",
keyColumns: new[] { "id_permission", "id_user_role" },
keyValues: new object[] { 126, 1 });
migrationBuilder.DeleteData(
table: "t_relation_user_role_permission",
keyColumns: new[] { "id_permission", "id_user_role" },
keyValues: new object[] { 127, 1 });
migrationBuilder.DeleteData(
table: "t_relation_user_role_permission",
keyColumns: new[] { "id_permission", "id_user_role" },
keyValues: new object[] { 128, 1 });
migrationBuilder.DeleteData(
table: "t_relation_user_role_permission",
keyColumns: new[] { "id_permission", "id_user_role" },
keyValues: new object[] { 129, 1 });
migrationBuilder.DeleteData(
table: "t_relation_user_role_permission",
keyColumns: new[] { "id_permission", "id_user_role" },
keyValues: new object[] { 200, 1 });
migrationBuilder.DeleteData(
table: "t_relation_user_role_permission",
keyColumns: new[] { "id_permission", "id_user_role" },
keyValues: new object[] { 201, 1 });
migrationBuilder.DeleteData(
table: "t_relation_user_role_permission",
keyColumns: new[] { "id_permission", "id_user_role" },
keyValues: new object[] { 202, 1 });
migrationBuilder.DeleteData(
table: "t_relation_user_role_permission",
keyColumns: new[] { "id_permission", "id_user_role" },
keyValues: new object[] { 203, 1 });
migrationBuilder.DeleteData(
table: "t_relation_user_role_permission",
keyColumns: new[] { "id_permission", "id_user_role" },
keyValues: new object[] { 204, 1 });
migrationBuilder.DeleteData(
table: "t_relation_user_role_permission",
keyColumns: new[] { "id_permission", "id_user_role" },
keyValues: new object[] { 205, 1 });
migrationBuilder.DeleteData(
table: "t_relation_user_role_permission",
keyColumns: new[] { "id_permission", "id_user_role" },
keyValues: new object[] { 206, 1 });
migrationBuilder.DeleteData(
table: "t_relation_user_role_permission",
keyColumns: new[] { "id_permission", "id_user_role" },
keyValues: new object[] { 207, 1 });
migrationBuilder.DeleteData(
table: "t_relation_user_role_permission",
keyColumns: new[] { "id_permission", "id_user_role" },
keyValues: new object[] { 208, 1 });
migrationBuilder.DeleteData(
table: "t_relation_user_role_permission",
keyColumns: new[] { "id_permission", "id_user_role" },
keyValues: new object[] { 209, 1 });
migrationBuilder.DeleteData(
table: "t_relation_user_role_permission",
keyColumns: new[] { "id_permission", "id_user_role" },
keyValues: new object[] { 210, 1 });
migrationBuilder.DeleteData(
table: "t_relation_user_role_permission",
keyColumns: new[] { "id_permission", "id_user_role" },
keyValues: new object[] { 211, 1 });
migrationBuilder.DeleteData(
table: "t_relation_user_role_permission",
keyColumns: new[] { "id_permission", "id_user_role" },
keyValues: new object[] { 212, 1 });
migrationBuilder.DeleteData(
table: "t_relation_user_role_permission",
keyColumns: new[] { "id_permission", "id_user_role" },
keyValues: new object[] { 213, 1 });
migrationBuilder.DeleteData(
table: "t_relation_user_role_permission",
keyColumns: new[] { "id_permission", "id_user_role" },
keyValues: new object[] { 214, 1 });
migrationBuilder.DeleteData(
table: "t_relation_user_role_permission",
keyColumns: new[] { "id_permission", "id_user_role" },
keyValues: new object[] { 215, 1 });
migrationBuilder.DeleteData(
table: "t_relation_user_role_permission",
keyColumns: new[] { "id_permission", "id_user_role" },
keyValues: new object[] { 216, 1 });
migrationBuilder.DeleteData(
table: "t_relation_user_role_permission",
keyColumns: new[] { "id_permission", "id_user_role" },
keyValues: new object[] { 217, 1 });
migrationBuilder.DeleteData(
table: "t_relation_user_role_permission",
keyColumns: new[] { "id_permission", "id_user_role" },
keyValues: new object[] { 218, 1 });
migrationBuilder.DeleteData(
table: "t_relation_user_role_permission",
keyColumns: new[] { "id_permission", "id_user_role" },
keyValues: new object[] { 219, 1 });
migrationBuilder.DeleteData(
table: "t_relation_user_role_permission",
keyColumns: new[] { "id_permission", "id_user_role" },
keyValues: new object[] { 220, 1 });
migrationBuilder.DeleteData(
table: "t_relation_user_role_permission",
keyColumns: new[] { "id_permission", "id_user_role" },
keyValues: new object[] { 221, 1 });
migrationBuilder.DeleteData(
table: "t_relation_user_role_permission",
keyColumns: new[] { "id_permission", "id_user_role" },
keyValues: new object[] { 222, 1 });
migrationBuilder.DeleteData(
table: "t_relation_user_role_permission",
keyColumns: new[] { "id_permission", "id_user_role" },
keyValues: new object[] { 223, 1 });
migrationBuilder.DeleteData(
table: "t_relation_user_role_permission",
keyColumns: new[] { "id_permission", "id_user_role" },
keyValues: new object[] { 224, 1 });
migrationBuilder.DeleteData(
table: "t_relation_user_role_permission",
keyColumns: new[] { "id_permission", "id_user_role" },
keyValues: new object[] { 225, 1 });
migrationBuilder.DeleteData(
table: "t_relation_user_role_permission",
keyColumns: new[] { "id_permission", "id_user_role" },
keyValues: new object[] { 226, 1 });
migrationBuilder.DeleteData(
table: "t_relation_user_role_permission",
keyColumns: new[] { "id_permission", "id_user_role" },
keyValues: new object[] { 227, 1 });
migrationBuilder.DeleteData(
table: "t_relation_user_role_permission",
keyColumns: new[] { "id_permission", "id_user_role" },
keyValues: new object[] { 228, 1 });
migrationBuilder.DeleteData(
table: "t_relation_user_role_permission",
keyColumns: new[] { "id_permission", "id_user_role" },
keyValues: new object[] { 229, 1 });
migrationBuilder.DeleteData(
table: "t_relation_user_role_permission",
keyColumns: new[] { "id_permission", "id_user_role" },
keyValues: new object[] { 230, 1 });
migrationBuilder.DeleteData(
table: "t_relation_user_role_permission",
keyColumns: new[] { "id_permission", "id_user_role" },
keyValues: new object[] { 231, 1 });
migrationBuilder.DeleteData(
table: "t_relation_user_role_permission",
keyColumns: new[] { "id_permission", "id_user_role" },
keyValues: new object[] { 232, 1 });
migrationBuilder.DeleteData(
table: "t_relation_user_role_permission",
keyColumns: new[] { "id_permission", "id_user_role" },
keyValues: new object[] { 233, 1 });
migrationBuilder.DeleteData(
table: "t_relation_user_role_permission",
keyColumns: new[] { "id_permission", "id_user_role" },
keyValues: new object[] { 234, 1 });
migrationBuilder.DeleteData(
table: "t_relation_user_role_permission",
keyColumns: new[] { "id_permission", "id_user_role" },
keyValues: new object[] { 235, 1 });
migrationBuilder.DeleteData(
table: "t_relation_user_role_permission",
keyColumns: new[] { "id_permission", "id_user_role" },
keyValues: new object[] { 236, 1 });
migrationBuilder.DeleteData(
table: "t_relation_user_role_permission",
keyColumns: new[] { "id_permission", "id_user_role" },
keyValues: new object[] { 237, 1 });
migrationBuilder.DeleteData(
table: "t_relation_user_role_permission",
keyColumns: new[] { "id_permission", "id_user_role" },
keyValues: new object[] { 238, 1 });
migrationBuilder.DeleteData(
table: "t_relation_user_role_permission",
keyColumns: new[] { "id_permission", "id_user_role" },
keyValues: new object[] { 239, 1 });
migrationBuilder.DeleteData(
table: "t_relation_user_role_permission",
keyColumns: new[] { "id_permission", "id_user_role" },
keyValues: new object[] { 240, 1 });
migrationBuilder.DeleteData(
table: "t_relation_user_role_permission",
keyColumns: new[] { "id_permission", "id_user_role" },
keyValues: new object[] { 241, 1 });
migrationBuilder.DeleteData(
table: "t_relation_user_role_permission",
keyColumns: new[] { "id_permission", "id_user_role" },
keyValues: new object[] { 242, 1 });
migrationBuilder.DeleteData(
table: "t_relation_user_role_permission",
keyColumns: new[] { "id_permission", "id_user_role" },
keyValues: new object[] { 243, 1 });
migrationBuilder.DeleteData(
table: "t_relation_user_role_permission",
keyColumns: new[] { "id_permission", "id_user_role" },
keyValues: new object[] { 244, 1 });
migrationBuilder.DeleteData(
table: "t_relation_user_role_permission",
keyColumns: new[] { "id_permission", "id_user_role" },
keyValues: new object[] { 245, 1 });
migrationBuilder.DeleteData(
table: "t_relation_user_role_permission",
keyColumns: new[] { "id_permission", "id_user_role" },
keyValues: new object[] { 246, 1 });
migrationBuilder.DeleteData(
table: "t_relation_user_role_permission",
keyColumns: new[] { "id_permission", "id_user_role" },
keyValues: new object[] { 247, 1 });
migrationBuilder.DeleteData(
table: "t_relation_user_role_permission",
keyColumns: new[] { "id_permission", "id_user_role" },
keyValues: new object[] { 248, 1 });
migrationBuilder.DeleteData(
table: "t_relation_user_role_permission",
keyColumns: new[] { "id_permission", "id_user_role" },
keyValues: new object[] { 249, 1 });
migrationBuilder.DeleteData(
table: "t_relation_user_role_permission",
keyColumns: new[] { "id_permission", "id_user_role" },
keyValues: new object[] { 250, 1 });
migrationBuilder.DeleteData(
table: "t_relation_user_role_permission",
keyColumns: new[] { "id_permission", "id_user_role" },
keyValues: new object[] { 251, 1 });
migrationBuilder.DeleteData(
table: "t_relation_user_role_permission",
keyColumns: new[] { "id_permission", "id_user_role" },
keyValues: new object[] { 252, 1 });
migrationBuilder.DeleteData(
table: "t_relation_user_role_permission",
keyColumns: new[] { "id_permission", "id_user_role" },
keyValues: new object[] { 253, 1 });
migrationBuilder.DeleteData(
table: "t_relation_user_role_permission",
keyColumns: new[] { "id_permission", "id_user_role" },
keyValues: new object[] { 254, 1 });
migrationBuilder.DeleteData(
table: "t_relation_user_role_permission",
keyColumns: new[] { "id_permission", "id_user_role" },
keyValues: new object[] { 255, 1 });
migrationBuilder.DeleteData(
table: "t_relation_user_role_permission",
keyColumns: new[] { "id_permission", "id_user_role" },
keyValues: new object[] { 256, 1 });
migrationBuilder.DeleteData(
table: "t_relation_user_role_permission",
keyColumns: new[] { "id_permission", "id_user_role" },
keyValues: new object[] { 257, 1 });
migrationBuilder.DeleteData(
table: "t_relation_user_role_permission",
keyColumns: new[] { "id_permission", "id_user_role" },
keyValues: new object[] { 258, 1 });
migrationBuilder.DeleteData(
table: "t_relation_user_role_permission",
keyColumns: new[] { "id_permission", "id_user_role" },
keyValues: new object[] { 259, 1 });
migrationBuilder.DeleteData(
table: "t_relation_user_role_permission",
keyColumns: new[] { "id_permission", "id_user_role" },
keyValues: new object[] { 260, 1 });
migrationBuilder.DeleteData(
table: "t_relation_user_role_permission",
keyColumns: new[] { "id_permission", "id_user_role" },
keyValues: new object[] { 261, 1 });
migrationBuilder.DeleteData(
table: "t_relation_user_role_permission",
keyColumns: new[] { "id_permission", "id_user_role" },
keyValues: new object[] { 262, 1 });
migrationBuilder.DeleteData(
table: "t_relation_user_role_permission",
keyColumns: new[] { "id_permission", "id_user_role" },
keyValues: new object[] { 263, 1 });
migrationBuilder.DeleteData(
table: "t_relation_user_role_permission",
keyColumns: new[] { "id_permission", "id_user_role" },
keyValues: new object[] { 264, 1 });
migrationBuilder.DeleteData(
table: "t_relation_user_role_permission",
keyColumns: new[] { "id_permission", "id_user_role" },
keyValues: new object[] { 265, 1 });
migrationBuilder.DeleteData(
table: "t_relation_user_role_permission",
keyColumns: new[] { "id_permission", "id_user_role" },
keyValues: new object[] { 266, 1 });
migrationBuilder.DeleteData(
table: "t_relation_user_role_permission",
keyColumns: new[] { "id_permission", "id_user_role" },
keyValues: new object[] { 267, 1 });
migrationBuilder.DeleteData(
table: "t_relation_user_role_permission",
keyColumns: new[] { "id_permission", "id_user_role" },
keyValues: new object[] { 268, 1 });
migrationBuilder.DeleteData(
table: "t_relation_user_role_permission",
keyColumns: new[] { "id_permission", "id_user_role" },
keyValues: new object[] { 269, 1 });
migrationBuilder.DeleteData(
table: "t_relation_user_role_permission",
keyColumns: new[] { "id_permission", "id_user_role" },
keyValues: new object[] { 380, 1 });
migrationBuilder.DeleteData(
table: "t_relation_user_role_permission",
keyColumns: new[] { "id_permission", "id_user_role" },
keyValues: new object[] { 381, 1 });
migrationBuilder.DeleteData(
table: "t_relation_user_role_permission",
keyColumns: new[] { "id_permission", "id_user_role" },
keyValues: new object[] { 382, 1 });
migrationBuilder.DeleteData(
table: "t_relation_user_role_permission",
keyColumns: new[] { "id_permission", "id_user_role" },
keyValues: new object[] { 383, 1 });
migrationBuilder.DeleteData(
table: "t_relation_user_role_permission",
keyColumns: new[] { "id_permission", "id_user_role" },
keyValues: new object[] { 384, 1 });
migrationBuilder.DeleteData(
table: "t_relation_user_role_permission",
keyColumns: new[] { "id_permission", "id_user_role" },
keyValues: new object[] { 385, 1 });
migrationBuilder.DeleteData(
table: "t_relation_user_role_permission",
keyColumns: new[] { "id_permission", "id_user_role" },
keyValues: new object[] { 386, 1 });
migrationBuilder.DeleteData(
table: "t_relation_user_role_permission",
keyColumns: new[] { "id_permission", "id_user_role" },
keyValues: new object[] { 387, 1 });
migrationBuilder.DeleteData(
table: "t_relation_user_role_permission",
keyColumns: new[] { "id_permission", "id_user_role" },
keyValues: new object[] { 388, 1 });
migrationBuilder.DeleteData(
table: "t_relation_user_role_permission",
keyColumns: new[] { "id_permission", "id_user_role" },
keyValues: new object[] { 389, 1 });
migrationBuilder.DeleteData(
table: "t_relation_user_role_permission",
keyColumns: new[] { "id_permission", "id_user_role" },
keyValues: new object[] { 390, 1 });
migrationBuilder.DeleteData(
table: "t_relation_user_role_permission",
keyColumns: new[] { "id_permission", "id_user_role" },
keyValues: new object[] { 391, 1 });
migrationBuilder.DeleteData(
table: "t_relation_user_role_permission",
keyColumns: new[] { "id_permission", "id_user_role" },
keyValues: new object[] { 400, 1 });
migrationBuilder.DeleteData(
table: "t_relation_user_role_permission",
keyColumns: new[] { "id_permission", "id_user_role" },
keyValues: new object[] { 401, 1 });
migrationBuilder.DeleteData(
table: "t_relation_user_role_permission",
keyColumns: new[] { "id_permission", "id_user_role" },
keyValues: new object[] { 407, 1 });
migrationBuilder.DeleteData(
table: "t_relation_user_role_permission",
keyColumns: new[] { "id_permission", "id_user_role" },
keyValues: new object[] { 408, 1 });
migrationBuilder.DeleteData(
table: "t_relation_user_role_permission",
keyColumns: new[] { "id_permission", "id_user_role" },
keyValues: new object[] { 450, 1 });
migrationBuilder.DeleteData(
table: "t_relation_user_role_permission",
keyColumns: new[] { "id_permission", "id_user_role" },
keyValues: new object[] { 460, 1 });
migrationBuilder.DeleteData(
table: "t_relation_user_role_permission",
keyColumns: new[] { "id_permission", "id_user_role" },
keyValues: new object[] { 461, 1 });
migrationBuilder.DeleteData(
table: "t_relation_user_role_permission",
keyColumns: new[] { "id_permission", "id_user_role" },
keyValues: new object[] { 507, 1 });
migrationBuilder.DeleteData(
table: "t_relation_user_role_permission",
keyColumns: new[] { "id_permission", "id_user_role" },
keyValues: new object[] { 513, 1 });
migrationBuilder.DeleteData(
table: "t_relation_user_role_permission",
keyColumns: new[] { "id_permission", "id_user_role" },
keyValues: new object[] { 514, 1 });
migrationBuilder.DeleteData(
table: "t_relation_user_role_permission",
keyColumns: new[] { "id_permission", "id_user_role" },
keyValues: new object[] { 515, 1 });
}
}
}

View File

@ -2665,6 +2665,601 @@ namespace AsbCloudDb.Migrations
IdPermission = 204
},
new
{
IdUserRole = 1,
IdPermission = 100
},
new
{
IdUserRole = 1,
IdPermission = 101
},
new
{
IdUserRole = 1,
IdPermission = 102
},
new
{
IdUserRole = 1,
IdPermission = 103
},
new
{
IdUserRole = 1,
IdPermission = 104
},
new
{
IdUserRole = 1,
IdPermission = 105
},
new
{
IdUserRole = 1,
IdPermission = 106
},
new
{
IdUserRole = 1,
IdPermission = 107
},
new
{
IdUserRole = 1,
IdPermission = 108
},
new
{
IdUserRole = 1,
IdPermission = 109
},
new
{
IdUserRole = 1,
IdPermission = 110
},
new
{
IdUserRole = 1,
IdPermission = 111
},
new
{
IdUserRole = 1,
IdPermission = 112
},
new
{
IdUserRole = 1,
IdPermission = 113
},
new
{
IdUserRole = 1,
IdPermission = 114
},
new
{
IdUserRole = 1,
IdPermission = 115
},
new
{
IdUserRole = 1,
IdPermission = 116
},
new
{
IdUserRole = 1,
IdPermission = 117
},
new
{
IdUserRole = 1,
IdPermission = 118
},
new
{
IdUserRole = 1,
IdPermission = 119
},
new
{
IdUserRole = 1,
IdPermission = 120
},
new
{
IdUserRole = 1,
IdPermission = 121
},
new
{
IdUserRole = 1,
IdPermission = 122
},
new
{
IdUserRole = 1,
IdPermission = 123
},
new
{
IdUserRole = 1,
IdPermission = 124
},
new
{
IdUserRole = 1,
IdPermission = 125
},
new
{
IdUserRole = 1,
IdPermission = 126
},
new
{
IdUserRole = 1,
IdPermission = 127
},
new
{
IdUserRole = 1,
IdPermission = 128
},
new
{
IdUserRole = 1,
IdPermission = 129
},
new
{
IdUserRole = 1,
IdPermission = 200
},
new
{
IdUserRole = 1,
IdPermission = 201
},
new
{
IdUserRole = 1,
IdPermission = 202
},
new
{
IdUserRole = 1,
IdPermission = 203
},
new
{
IdUserRole = 1,
IdPermission = 204
},
new
{
IdUserRole = 1,
IdPermission = 205
},
new
{
IdUserRole = 1,
IdPermission = 206
},
new
{
IdUserRole = 1,
IdPermission = 207
},
new
{
IdUserRole = 1,
IdPermission = 208
},
new
{
IdUserRole = 1,
IdPermission = 209
},
new
{
IdUserRole = 1,
IdPermission = 210
},
new
{
IdUserRole = 1,
IdPermission = 211
},
new
{
IdUserRole = 1,
IdPermission = 212
},
new
{
IdUserRole = 1,
IdPermission = 213
},
new
{
IdUserRole = 1,
IdPermission = 214
},
new
{
IdUserRole = 1,
IdPermission = 215
},
new
{
IdUserRole = 1,
IdPermission = 216
},
new
{
IdUserRole = 1,
IdPermission = 217
},
new
{
IdUserRole = 1,
IdPermission = 218
},
new
{
IdUserRole = 1,
IdPermission = 219
},
new
{
IdUserRole = 1,
IdPermission = 220
},
new
{
IdUserRole = 1,
IdPermission = 221
},
new
{
IdUserRole = 1,
IdPermission = 222
},
new
{
IdUserRole = 1,
IdPermission = 223
},
new
{
IdUserRole = 1,
IdPermission = 224
},
new
{
IdUserRole = 1,
IdPermission = 225
},
new
{
IdUserRole = 1,
IdPermission = 226
},
new
{
IdUserRole = 1,
IdPermission = 227
},
new
{
IdUserRole = 1,
IdPermission = 228
},
new
{
IdUserRole = 1,
IdPermission = 229
},
new
{
IdUserRole = 1,
IdPermission = 230
},
new
{
IdUserRole = 1,
IdPermission = 231
},
new
{
IdUserRole = 1,
IdPermission = 232
},
new
{
IdUserRole = 1,
IdPermission = 233
},
new
{
IdUserRole = 1,
IdPermission = 234
},
new
{
IdUserRole = 1,
IdPermission = 235
},
new
{
IdUserRole = 1,
IdPermission = 236
},
new
{
IdUserRole = 1,
IdPermission = 237
},
new
{
IdUserRole = 1,
IdPermission = 238
},
new
{
IdUserRole = 1,
IdPermission = 239
},
new
{
IdUserRole = 1,
IdPermission = 240
},
new
{
IdUserRole = 1,
IdPermission = 241
},
new
{
IdUserRole = 1,
IdPermission = 242
},
new
{
IdUserRole = 1,
IdPermission = 243
},
new
{
IdUserRole = 1,
IdPermission = 244
},
new
{
IdUserRole = 1,
IdPermission = 245
},
new
{
IdUserRole = 1,
IdPermission = 246
},
new
{
IdUserRole = 1,
IdPermission = 247
},
new
{
IdUserRole = 1,
IdPermission = 248
},
new
{
IdUserRole = 1,
IdPermission = 249
},
new
{
IdUserRole = 1,
IdPermission = 250
},
new
{
IdUserRole = 1,
IdPermission = 251
},
new
{
IdUserRole = 1,
IdPermission = 252
},
new
{
IdUserRole = 1,
IdPermission = 253
},
new
{
IdUserRole = 1,
IdPermission = 254
},
new
{
IdUserRole = 1,
IdPermission = 255
},
new
{
IdUserRole = 1,
IdPermission = 256
},
new
{
IdUserRole = 1,
IdPermission = 257
},
new
{
IdUserRole = 1,
IdPermission = 258
},
new
{
IdUserRole = 1,
IdPermission = 259
},
new
{
IdUserRole = 1,
IdPermission = 260
},
new
{
IdUserRole = 1,
IdPermission = 261
},
new
{
IdUserRole = 1,
IdPermission = 262
},
new
{
IdUserRole = 1,
IdPermission = 263
},
new
{
IdUserRole = 1,
IdPermission = 264
},
new
{
IdUserRole = 1,
IdPermission = 265
},
new
{
IdUserRole = 1,
IdPermission = 266
},
new
{
IdUserRole = 1,
IdPermission = 267
},
new
{
IdUserRole = 1,
IdPermission = 268
},
new
{
IdUserRole = 1,
IdPermission = 269
},
new
{
IdUserRole = 1,
IdPermission = 380
},
new
{
IdUserRole = 1,
IdPermission = 381
},
new
{
IdUserRole = 1,
IdPermission = 382
},
new
{
IdUserRole = 1,
IdPermission = 383
},
new
{
IdUserRole = 1,
IdPermission = 384
},
new
{
IdUserRole = 1,
IdPermission = 385
},
new
{
IdUserRole = 1,
IdPermission = 386
},
new
{
IdUserRole = 1,
IdPermission = 387
},
new
{
IdUserRole = 1,
IdPermission = 388
},
new
{
IdUserRole = 1,
IdPermission = 389
},
new
{
IdUserRole = 1,
IdPermission = 390
},
new
{
IdUserRole = 1,
IdPermission = 391
},
new
{
IdUserRole = 1,
IdPermission = 400
},
new
{
IdUserRole = 1,
IdPermission = 401
},
new
{
IdUserRole = 1,
IdPermission = 407
},
new
{
IdUserRole = 1,
IdPermission = 408
},
new
{
IdUserRole = 1,
IdPermission = 450
},
new
{
IdUserRole = 1,
IdPermission = 460
},
new
{
IdUserRole = 1,
IdPermission = 461
},
new
{
IdUserRole = 1,
IdPermission = 500
@ -2700,6 +3295,11 @@ namespace AsbCloudDb.Migrations
IdPermission = 506
},
new
{
IdUserRole = 1,
IdPermission = 507
},
new
{
IdUserRole = 1,
IdPermission = 510
@ -2713,6 +3313,21 @@ namespace AsbCloudDb.Migrations
{
IdUserRole = 1,
IdPermission = 512
},
new
{
IdUserRole = 1,
IdPermission = 513
},
new
{
IdUserRole = 1,
IdPermission = 514
},
new
{
IdUserRole = 1,
IdPermission = 515
});
});

View File

@ -1,60 +1,72 @@
namespace AsbCloudDb.Model.DefaultData
using System.Collections.Generic;
namespace AsbCloudDb.Model.DefaultData
{
internal class EntityFillerRelationUserRolePermission: EntityFiller<RelationUserRolePermission>
{
public override RelationUserRolePermission[] GetData() => new RelationUserRolePermission[]{
new (){ IdUserRole = 1100, IdPermission = 102}, new (){ IdUserRole = 1100, IdPermission = 111},
new (){ IdUserRole = 1101, IdPermission = 101}, new (){ IdUserRole = 1101, IdPermission = 100},
new (){ IdUserRole = 1102, IdPermission = 105}, new (){ IdUserRole = 1102, IdPermission = 108},
new (){ IdUserRole = 1103, IdPermission = 104}, new (){ IdUserRole = 1103, IdPermission = 103},
new (){ IdUserRole = 1104, IdPermission = 108},
new (){ IdUserRole = 1105, IdPermission = 107}, new (){ IdUserRole = 1105, IdPermission = 106},
new (){ IdUserRole = 1106, IdPermission = 111},
new (){ IdUserRole = 1107, IdPermission = 110}, new (){ IdUserRole = 1107, IdPermission = 109},
new (){ IdUserRole = 1108, IdPermission = 114},
new (){ IdUserRole = 1109, IdPermission = 113}, new (){ IdUserRole = 1109, IdPermission = 112},
new (){ IdUserRole = 1110, IdPermission = 123}, new (){ IdUserRole = 1110, IdPermission = 114},
new (){ IdUserRole = 1111, IdPermission = 122}, new (){ IdUserRole = 1111, IdPermission = 121},
new (){ IdUserRole = 1112, IdPermission = 117},
new (){ IdUserRole = 1113, IdPermission = 105}, new (){ IdUserRole = 1113, IdPermission = 123}, new (){ IdUserRole = 1113, IdPermission = 120},
new (){ IdUserRole = 1114, IdPermission = 119}, new (){ IdUserRole = 1114, IdPermission = 118}, new (){ IdUserRole = 1114, IdPermission = 200},
new (){ IdUserRole = 1115, IdPermission = 223},
new (){ IdUserRole = 1116, IdPermission = 105}, new (){ IdUserRole = 1116, IdPermission = 102}, new (){ IdUserRole = 1116, IdPermission = 117}, new (){ IdUserRole = 1116, IdPermission = 126},
new (){ IdUserRole = 1117, IdPermission = 125}, new (){ IdUserRole = 1117, IdPermission = 124},
new (){ IdUserRole = 1200, IdPermission = 203}, new (){ IdUserRole = 1200, IdPermission = 230},
new (){ IdUserRole = 1201, IdPermission = 202}, new (){ IdUserRole = 1201, IdPermission = 203}, new (){ IdUserRole = 1201, IdPermission = 220},
new (){ IdUserRole = 1202, IdPermission = 203}, new (){ IdUserRole = 1202, IdPermission = 220}, new (){ IdUserRole = 1202, IdPermission = 236}, new (){ IdUserRole = 1202, IdPermission = 212},
new (){ IdUserRole = 1203, IdPermission = 235},
new (){ IdUserRole = 1204, IdPermission = 202}, new (){ IdUserRole = 1204, IdPermission = 203},
new (){ IdUserRole = 1205, IdPermission = 215},
new (){ IdUserRole = 1206, IdPermission = 203}, new (){ IdUserRole = 1206, IdPermission = 206},
new (){ IdUserRole = 1207, IdPermission = 205},
new (){ IdUserRole = 1208, IdPermission = 218},
new (){ IdUserRole = 1209, IdPermission = 217},
new (){ IdUserRole = 1210, IdPermission = 203}, new (){ IdUserRole = 1210, IdPermission = 230}, new (){ IdUserRole = 1210, IdPermission = 219},
new (){ IdUserRole = 1211, IdPermission = 203}, new (){ IdUserRole = 1211, IdPermission = 220}, new (){ IdUserRole = 1211, IdPermission = 239},
new (){ IdUserRole = 1212, IdPermission = 238}, new (){ IdUserRole = 1212, IdPermission = 237},
new (){ IdUserRole = 1213, IdPermission = 203}, new (){ IdUserRole = 1213, IdPermission = 239}, new (){ IdUserRole = 1213, IdPermission = 212},
new (){ IdUserRole = 1214, IdPermission = 211}, new (){ IdUserRole = 1214, IdPermission = 210},
new (){ IdUserRole = 1215, IdPermission = 203}, new (){ IdUserRole = 1215, IdPermission = 222},
new (){ IdUserRole = 1216, IdPermission = 221},
new (){ IdUserRole = 1217, IdPermission = 226},
new (){ IdUserRole = 1218, IdPermission = 225}, new (){ IdUserRole = 1218, IdPermission = 224},
new (){ IdUserRole = 1219, IdPermission = 203}, new (){ IdUserRole = 1219, IdPermission = 206}, new (){ IdUserRole = 1219, IdPermission = 230}, new (){ IdUserRole = 1219, IdPermission = 232},
new (){ IdUserRole = 1220, IdPermission = 203}, new (){ IdUserRole = 1220, IdPermission = 228},
new (){ IdUserRole = 1221, IdPermission = 202}, new (){ IdUserRole = 1221, IdPermission = 203}, new (){ IdUserRole = 1221, IdPermission = 220}, new (){ IdUserRole = 1221, IdPermission = 234},
new (){ IdUserRole = 1500, IdPermission = 507}, new (){ IdUserRole = 1500, IdPermission = 510},
new (){ IdUserRole = 1501, IdPermission = 214}, new (){ IdUserRole = 1501, IdPermission = 213},
new (){ IdUserRole = 1502, IdPermission = 207}, new (){ IdUserRole = 1502, IdPermission = 208},
new (){ IdUserRole = 2000, IdPermission = 205}, new (){ IdUserRole = 2000, IdPermission = 204}, new (){ IdUserRole = 2000, IdPermission = 245},
new (){ IdUserRole = 2001, IdPermission = 244}, new (){ IdUserRole = 2001, IdPermission = 245},
new (){ IdUserRole = 2002, IdPermission = 244}, new (){ IdUserRole = 2002, IdPermission = 246}, new (){ IdUserRole = 2002, IdPermission = 237}, new (){ IdUserRole = 2002, IdPermission = 238},
new (){ IdUserRole = 2003, IdPermission = 240}, new (){ IdUserRole = 2003, IdPermission = 217}, new (){ IdUserRole = 2003, IdPermission = 216},
new (){ IdUserRole = 2004, IdPermission = 242}, new (){ IdUserRole = 2004, IdPermission = 217}, new (){ IdUserRole = 2004, IdPermission = 216}, new (){ IdUserRole = 2004, IdPermission = 205}, new (){ IdUserRole = 2004, IdPermission = 204},
new (){ IdUserRole = 2005, IdPermission = 247}, new (){ IdUserRole = 2005, IdPermission = 205}, new (){ IdUserRole = 2005, IdPermission = 204},
new (){ IdUserRole = 2006, IdPermission = 243}, new (){ IdUserRole = 2006, IdPermission = 205}, new (){ IdUserRole = 2006, IdPermission = 204},
new (){ IdUserRole = 2007, IdPermission = 241}, new (){ IdUserRole = 2007, IdPermission = 205}, new (){ IdUserRole = 2007, IdPermission = 204},
new (){ IdUserRole = 1, IdPermission = 500}, new (){ IdUserRole = 1, IdPermission = 501}, new (){ IdUserRole = 1, IdPermission = 502}, new (){ IdUserRole = 1, IdPermission = 503}, new (){ IdUserRole = 1, IdPermission = 504}, new (){ IdUserRole = 1, IdPermission = 505}, new (){ IdUserRole = 1, IdPermission = 506}, new (){ IdUserRole = 1, IdPermission = 510}, new (){ IdUserRole = 1, IdPermission = 511}, new (){ IdUserRole = 1, IdPermission = 512},
};
public override RelationUserRolePermission[] GetData()
{
var result = new List<RelationUserRolePermission>{
new (){ IdUserRole = 1100, IdPermission = 102}, new (){ IdUserRole = 1100, IdPermission = 111},
new (){ IdUserRole = 1101, IdPermission = 101}, new (){ IdUserRole = 1101, IdPermission = 100},
new (){ IdUserRole = 1102, IdPermission = 105}, new (){ IdUserRole = 1102, IdPermission = 108},
new (){ IdUserRole = 1103, IdPermission = 104}, new (){ IdUserRole = 1103, IdPermission = 103},
new (){ IdUserRole = 1104, IdPermission = 108},
new (){ IdUserRole = 1105, IdPermission = 107}, new (){ IdUserRole = 1105, IdPermission = 106},
new (){ IdUserRole = 1106, IdPermission = 111},
new (){ IdUserRole = 1107, IdPermission = 110}, new (){ IdUserRole = 1107, IdPermission = 109},
new (){ IdUserRole = 1108, IdPermission = 114},
new (){ IdUserRole = 1109, IdPermission = 113}, new (){ IdUserRole = 1109, IdPermission = 112},
new (){ IdUserRole = 1110, IdPermission = 123}, new (){ IdUserRole = 1110, IdPermission = 114},
new (){ IdUserRole = 1111, IdPermission = 122}, new (){ IdUserRole = 1111, IdPermission = 121},
new (){ IdUserRole = 1112, IdPermission = 117},
new (){ IdUserRole = 1113, IdPermission = 105}, new (){ IdUserRole = 1113, IdPermission = 123}, new (){ IdUserRole = 1113, IdPermission = 120},
new (){ IdUserRole = 1114, IdPermission = 119}, new (){ IdUserRole = 1114, IdPermission = 118}, new (){ IdUserRole = 1114, IdPermission = 200},
new (){ IdUserRole = 1115, IdPermission = 223},
new (){ IdUserRole = 1116, IdPermission = 105}, new (){ IdUserRole = 1116, IdPermission = 102}, new (){ IdUserRole = 1116, IdPermission = 117}, new (){ IdUserRole = 1116, IdPermission = 126},
new (){ IdUserRole = 1117, IdPermission = 125}, new (){ IdUserRole = 1117, IdPermission = 124},
new (){ IdUserRole = 1200, IdPermission = 203}, new (){ IdUserRole = 1200, IdPermission = 230},
new (){ IdUserRole = 1201, IdPermission = 202}, new (){ IdUserRole = 1201, IdPermission = 203}, new (){ IdUserRole = 1201, IdPermission = 220},
new (){ IdUserRole = 1202, IdPermission = 203}, new (){ IdUserRole = 1202, IdPermission = 220}, new (){ IdUserRole = 1202, IdPermission = 236}, new (){ IdUserRole = 1202, IdPermission = 212},
new (){ IdUserRole = 1203, IdPermission = 235},
new (){ IdUserRole = 1204, IdPermission = 202}, new (){ IdUserRole = 1204, IdPermission = 203},
new (){ IdUserRole = 1205, IdPermission = 215},
new (){ IdUserRole = 1206, IdPermission = 203}, new (){ IdUserRole = 1206, IdPermission = 206},
new (){ IdUserRole = 1207, IdPermission = 205},
new (){ IdUserRole = 1208, IdPermission = 218},
new (){ IdUserRole = 1209, IdPermission = 217},
new (){ IdUserRole = 1210, IdPermission = 203}, new (){ IdUserRole = 1210, IdPermission = 230}, new (){ IdUserRole = 1210, IdPermission = 219},
new (){ IdUserRole = 1211, IdPermission = 203}, new (){ IdUserRole = 1211, IdPermission = 220}, new (){ IdUserRole = 1211, IdPermission = 239},
new (){ IdUserRole = 1212, IdPermission = 238}, new (){ IdUserRole = 1212, IdPermission = 237},
new (){ IdUserRole = 1213, IdPermission = 203}, new (){ IdUserRole = 1213, IdPermission = 239}, new (){ IdUserRole = 1213, IdPermission = 212},
new (){ IdUserRole = 1214, IdPermission = 211}, new (){ IdUserRole = 1214, IdPermission = 210},
new (){ IdUserRole = 1215, IdPermission = 203}, new (){ IdUserRole = 1215, IdPermission = 222},
new (){ IdUserRole = 1216, IdPermission = 221},
new (){ IdUserRole = 1217, IdPermission = 226},
new (){ IdUserRole = 1218, IdPermission = 225}, new (){ IdUserRole = 1218, IdPermission = 224},
new (){ IdUserRole = 1219, IdPermission = 203}, new (){ IdUserRole = 1219, IdPermission = 206}, new (){ IdUserRole = 1219, IdPermission = 230}, new (){ IdUserRole = 1219, IdPermission = 232},
new (){ IdUserRole = 1220, IdPermission = 203}, new (){ IdUserRole = 1220, IdPermission = 228},
new (){ IdUserRole = 1221, IdPermission = 202}, new (){ IdUserRole = 1221, IdPermission = 203}, new (){ IdUserRole = 1221, IdPermission = 220}, new (){ IdUserRole = 1221, IdPermission = 234},
new (){ IdUserRole = 1500, IdPermission = 507}, new (){ IdUserRole = 1500, IdPermission = 510},
new (){ IdUserRole = 1501, IdPermission = 214}, new (){ IdUserRole = 1501, IdPermission = 213},
new (){ IdUserRole = 1502, IdPermission = 207}, new (){ IdUserRole = 1502, IdPermission = 208},
new (){ IdUserRole = 2000, IdPermission = 205}, new (){ IdUserRole = 2000, IdPermission = 204}, new (){ IdUserRole = 2000, IdPermission = 245},
new (){ IdUserRole = 2001, IdPermission = 244}, new (){ IdUserRole = 2001, IdPermission = 245},
new (){ IdUserRole = 2002, IdPermission = 244}, new (){ IdUserRole = 2002, IdPermission = 246}, new (){ IdUserRole = 2002, IdPermission = 237}, new (){ IdUserRole = 2002, IdPermission = 238},
new (){ IdUserRole = 2003, IdPermission = 240}, new (){ IdUserRole = 2003, IdPermission = 217}, new (){ IdUserRole = 2003, IdPermission = 216},
new (){ IdUserRole = 2004, IdPermission = 242}, new (){ IdUserRole = 2004, IdPermission = 217}, new (){ IdUserRole = 2004, IdPermission = 216}, new (){ IdUserRole = 2004, IdPermission = 205}, new (){ IdUserRole = 2004, IdPermission = 204},
new (){ IdUserRole = 2005, IdPermission = 247}, new (){ IdUserRole = 2005, IdPermission = 205}, new (){ IdUserRole = 2005, IdPermission = 204},
new (){ IdUserRole = 2006, IdPermission = 243}, new (){ IdUserRole = 2006, IdPermission = 205}, new (){ IdUserRole = 2006, IdPermission = 204},
new (){ IdUserRole = 2007, IdPermission = 241}, new (){ IdUserRole = 2007, IdPermission = 205}, new (){ IdUserRole = 2007, IdPermission = 204},
//new (){ IdUserRole = 1, IdPermission = 500}, new (){ IdUserRole = 1, IdPermission = 501}, new (){ IdUserRole = 1, IdPermission = 502}, new (){ IdUserRole = 1, IdPermission = 503}, new (){ IdUserRole = 1, IdPermission = 504}, new (){ IdUserRole = 1, IdPermission = 505}, new (){ IdUserRole = 1, IdPermission = 506}, new (){ IdUserRole = 1, IdPermission = 510}, new (){ IdUserRole = 1, IdPermission = 511}, new (){ IdUserRole = 1, IdPermission = 512}, new (){ IdUserRole = 1, IdPermission = 513}, new (){ IdUserRole = 1, IdPermission = 514}, new (){ IdUserRole = 1, IdPermission = 515},
};
var allPermissions = (new EntityFillerPermission()).GetData();
foreach ( var permission in allPermissions)
{
var rootRelation = new RelationUserRolePermission() { IdUserRole = 1, IdPermission = permission.Id };
result.Add( rootRelation );
}
return result.ToArray();
}
}
}