Disabled PermissionMiddleware and removed [Permission] from TelemetryController

This commit is contained in:
Харченко Владимир 2022-01-27 13:21:12 +05:00
parent a16cada896
commit eaf7cb85b2
2 changed files with 1 additions and 6 deletions

View File

@ -47,7 +47,6 @@ namespace AsbCloudWebApi.Controllers
/// <returns></returns>
[HttpPost]
[Route("{uid}/info")]
[Permission]
public async Task<IActionResult> PostInfoAsync(string uid, [FromBody] TelemetryInfoDto info,
CancellationToken token = default)
{
@ -64,7 +63,6 @@ namespace AsbCloudWebApi.Controllers
/// <returns></returns>
[HttpPost]
[Route("{uid}/timezone")]
[Permission]
public async Task<IActionResult> UpdateTimeZoneAsync(string uid, SimpleTimezoneDto timezone,
CancellationToken token = default)
{
@ -82,7 +80,6 @@ namespace AsbCloudWebApi.Controllers
/// <returns></returns>
[HttpPost]
[Route("{uid}/message")]
[Permission]
public async Task<IActionResult> PostMessagesAsync(string uid, [FromBody] IEnumerable<TelemetryMessageDto> dtos,
CancellationToken token = default)
{
@ -105,7 +102,6 @@ namespace AsbCloudWebApi.Controllers
/// <returns></returns>
[HttpPost]
[Route("{uid}/event")]
[Permission]
public async Task<IActionResult> PostEventsAsync(string uid, [FromBody] List<EventDto> events,
CancellationToken token = default)
{
@ -122,7 +118,6 @@ namespace AsbCloudWebApi.Controllers
/// <returns></returns>
[HttpPost]
[Route("{uid}/user")]
[Permission]
public IActionResult PostUsers(string uid, [FromBody] List<TelemetryUserDto> users)
{
telemetryUserService.Upsert(uid, users);

View File

@ -91,7 +91,7 @@ namespace AsbCloudWebApi
app.UseAuthentication();
app.UseAuthorization();
app.UseMiddleware<PermissionsMiddlware>();
// app.UseMiddleware<PermissionsMiddlware>();
app.UseMiddleware<SimplifyExceptionsMiddleware>();
app.UseMiddleware<RequerstTrackerMiddleware>();