forked from ddrilling/AsbCloudServer
Сняты права на просмотр и создания вопросов в faq-контроллере
This commit is contained in:
parent
d1fc1f5ff0
commit
7e04eaac1a
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
|
||||
});
|
||||
});
|
||||
|
||||
|
@ -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)
|
||||
{
|
||||
@ -84,6 +83,7 @@ namespace AsbCloudWebApi.Controllers
|
||||
/// <returns></returns>
|
||||
/// <exception cref="ArgumentInvalidException"></exception>
|
||||
[HttpGet("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