forked from ddrilling/AsbCloudServer
Merge branch 'dev' into feature/fact-trajectory
This commit is contained in:
commit
806e6c03e1
8087
AsbCloudDb/Migrations/20230504111955_Add_Permission_For_FaqStatistics.Designer.cs
generated
Normal file
8087
AsbCloudDb/Migrations/20230504111955_Add_Permission_For_FaqStatistics.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,65 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace AsbCloudDb.Migrations
|
||||
{
|
||||
public partial class Add_Permission_For_FaqStatistics : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.InsertData(
|
||||
table: "t_permission",
|
||||
columns: new[] { "id", "description", "name" },
|
||||
values: new object[,]
|
||||
{
|
||||
{ 516, "Разрешение просматривать статистику вопросов", "FaqStatistics.get" },
|
||||
{ 517, "Разрешение редактировать вопрос", "FaqStatistics.edit" },
|
||||
{ 518, "Разрешение удалять вопрос", "FaqStatistics.delete" }
|
||||
});
|
||||
|
||||
migrationBuilder.InsertData(
|
||||
table: "t_relation_user_role_permission",
|
||||
columns: new[] { "id_permission", "id_user_role" },
|
||||
values: new object[,]
|
||||
{
|
||||
{ 516, 1 },
|
||||
{ 517, 1 },
|
||||
{ 518, 1 }
|
||||
});
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DeleteData(
|
||||
table: "t_relation_user_role_permission",
|
||||
keyColumns: new[] { "id_permission", "id_user_role" },
|
||||
keyValues: new object[] { 516, 1 });
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "t_relation_user_role_permission",
|
||||
keyColumns: new[] { "id_permission", "id_user_role" },
|
||||
keyValues: new object[] { 517, 1 });
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "t_relation_user_role_permission",
|
||||
keyColumns: new[] { "id_permission", "id_user_role" },
|
||||
keyValues: new object[] { 518, 1 });
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "t_permission",
|
||||
keyColumn: "id",
|
||||
keyValue: 516);
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "t_permission",
|
||||
keyColumn: "id",
|
||||
keyValue: 517);
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "t_permission",
|
||||
keyColumn: "id",
|
||||
keyValue: 518);
|
||||
}
|
||||
}
|
||||
}
|
@ -1978,6 +1978,24 @@ namespace AsbCloudDb.Migrations
|
||||
Id = 515,
|
||||
Description = "Разрешение удалять РТК",
|
||||
Name = "ProcessMap.delete"
|
||||
},
|
||||
new
|
||||
{
|
||||
Id = 516,
|
||||
Description = "Разрешение просматривать статистику вопросов",
|
||||
Name = "FaqStatistics.get"
|
||||
},
|
||||
new
|
||||
{
|
||||
Id = 517,
|
||||
Description = "Разрешение редактировать вопрос",
|
||||
Name = "FaqStatistics.edit"
|
||||
},
|
||||
new
|
||||
{
|
||||
Id = 518,
|
||||
Description = "Разрешение удалять вопрос",
|
||||
Name = "FaqStatistics.delete"
|
||||
});
|
||||
});
|
||||
|
||||
@ -3508,6 +3526,21 @@ namespace AsbCloudDb.Migrations
|
||||
{
|
||||
IdUserRole = 1,
|
||||
IdPermission = 515
|
||||
},
|
||||
new
|
||||
{
|
||||
IdUserRole = 1,
|
||||
IdPermission = 516
|
||||
},
|
||||
new
|
||||
{
|
||||
IdUserRole = 1,
|
||||
IdPermission = 517
|
||||
},
|
||||
new
|
||||
{
|
||||
IdUserRole = 1,
|
||||
IdPermission = 518
|
||||
});
|
||||
});
|
||||
|
||||
|
@ -145,6 +145,10 @@
|
||||
new (){ Id = 513, Name="ProcessMap.get", Description="Разрешение просматривать РТК"},
|
||||
new (){ Id = 514, Name="ProcessMap.edit", Description="Разрешение редактировать РТК"},
|
||||
new (){ Id = 515, Name="ProcessMap.delete", Description="Разрешение удалять РТК"},
|
||||
|
||||
new (){ Id = 516, Name="FaqStatistics.get", Description="Разрешение просматривать статистику вопросов"},
|
||||
new (){ Id = 517, Name="FaqStatistics.edit", Description="Разрешение редактировать вопрос"},
|
||||
new (){ Id = 518, Name="FaqStatistics.delete", Description="Разрешение удалять вопрос"},
|
||||
};
|
||||
}
|
||||
}
|
||||
|
@ -32,7 +32,6 @@ namespace AsbCloudWebApi.Controllers
|
||||
/// <param name="token"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet]
|
||||
[Permission]
|
||||
[ProducesResponseType(typeof(IEnumerable<FaqDto>), (int)System.Net.HttpStatusCode.OK)]
|
||||
public async Task<IActionResult> GetFilteredAsync(
|
||||
[FromQuery] FaqRequest request,
|
||||
@ -49,7 +48,6 @@ namespace AsbCloudWebApi.Controllers
|
||||
/// <param name="token"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
[Permission]
|
||||
[ProducesResponseType(typeof(FaqDto), (int)System.Net.HttpStatusCode.OK)]
|
||||
public async Task<IActionResult> InsertAsync(
|
||||
[FromBody] FaqDto faqDto,
|
||||
@ -64,6 +62,7 @@ namespace AsbCloudWebApi.Controllers
|
||||
}
|
||||
|
||||
[HttpPut]
|
||||
[Permission]
|
||||
[ProducesResponseType(typeof(int), (int)System.Net.HttpStatusCode.OK)]
|
||||
public async Task<IActionResult> UpdateAsync([FromBody] FaqDto faqDto, CancellationToken token)
|
||||
{
|
||||
@ -83,7 +82,8 @@ namespace AsbCloudWebApi.Controllers
|
||||
/// <param name="token"></param>
|
||||
/// <returns></returns>
|
||||
/// <exception cref="ArgumentInvalidException"></exception>
|
||||
[HttpGet("merge")]
|
||||
[HttpPost("merge")]
|
||||
[Permission]
|
||||
[ProducesResponseType(typeof(int), (int)System.Net.HttpStatusCode.OK)]
|
||||
public async Task<IActionResult> MergeAsync(
|
||||
[FromQuery] int sourceId1,
|
||||
|
Loading…
Reference in New Issue
Block a user