last ...
This commit is contained in:
@@ -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
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user