- Create RolePermissionService (delegates to AppPermissions) - Create AuthSignInService (wraps SignInManager) - Create AuthDataService (handles settings, first-user, token revocation) - Register all new services in Infrastructure DI - Fix AuthDataService RevokedRefreshToken constructor usage - All 226 tests passing
21 lines
580 B
C#
21 lines
580 B
C#
using Heimdall.Application.Services;
|
|
using Heimdall.Infrastructure.Security;
|
|
|
|
namespace Heimdall.Infrastructure.Security;
|
|
|
|
public class RolePermissionService : IRolePermissionService
|
|
{
|
|
public IList<string> GetPermissionsForRoles(IList<string> roles)
|
|
{
|
|
var permissions = new List<string>();
|
|
foreach (var role in roles)
|
|
{
|
|
if (AppPermissions.RolePermissions.TryGetValue(role, out var rolePerms))
|
|
{
|
|
permissions.AddRange(rolePerms);
|
|
}
|
|
}
|
|
return permissions.Distinct().ToList();
|
|
}
|
|
}
|