This commit is contained in:
2026-11-17 18:11:45 +03:30
parent 19fece89bd
commit ad69ce5ebc
2 changed files with 175 additions and 0 deletions
+23
View File
@@ -1,6 +1,9 @@
using xCommons.Extensions;
using System.Threading.Tasks;
using xIdentityService.Interfaces;
using xIdentityModels.Dtos;
using System.Threading;
using System.Linq;
//
// TODO: Remove this to xIds ...
@@ -56,5 +59,25 @@ namespace xIdentityService.Providers
}
}
#endregion
//
#region Private ...
//
private async Task<XPolicyDefinitionDto> ToDtoWithEffectiveRolesAsync(
XPolicyDefinitionDto item,
CancellationToken cancellationToken = default
)
{
//
item.EffectiveRoles = (await resolver.ResolveEffectiveRolesAsync(
minRoleWeight: item.MinRoleWeight,
cancellationToken: cancellationToken,
explicitRoles: item.RequiredRoles.ParseListString<string>()
)).ToList();
//
return item;
}
#endregion
}
}