#7759269 Проверка ролей на зацикливание включенных ролей

This commit is contained in:
ai.astrakhantsev 2022-11-29 11:22:34 +05:00
parent c9c60bce2b
commit 4a547d82ae

View File

@ -5,7 +5,6 @@ using AsbCloudApp.Repositories;
using AsbCloudDb; using AsbCloudDb;
using AsbCloudDb.Model; using AsbCloudDb.Model;
using AsbCloudInfrastructure.EfCache; using AsbCloudInfrastructure.EfCache;
using DocumentFormat.OpenXml.Vml.Office;
using Mapster; using Mapster;
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
using System; using System;
@ -213,21 +212,6 @@ namespace AsbCloudInfrastructure.Repository
DropCacheRelationUserRoleUserRole(); DropCacheRelationUserRoleUserRole();
} }
//private IEnumerable<int> GetNestedRoleIds(UserRoleDto dto)
//{
// var result = new List<int>();
// if (dto.Roles is not null)
// {
// foreach (var role in dto.Roles)
// {
// result.Add(role.Id);
// if (role.Roles is not null)
// GetNestedRoleIds(role);
// }
// }
// return result;
//}
private async Task UpdatePermissionsAsync(UserRoleDto dto, CancellationToken token) private async Task UpdatePermissionsAsync(UserRoleDto dto, CancellationToken token)
{ {
if (dto?.Permissions is null) if (dto?.Permissions is null)