feat: pivot to social media workflow app
Some checks failed
Backend CI/CD / build_and_deploy (push) Has been cancelled
Frontend CI/CD / build_and_deploy (push) Has been cancelled

This commit is contained in:
2026-04-24 12:58:35 -04:00
parent 0f4acc1b6d
commit df3e602015
349 changed files with 18685 additions and 16010 deletions

View File

@@ -1,7 +1,8 @@
using System.Security.Claims;
using Hutopy.Modules.Identity.Models;
using Socialize.Infrastructure.Security;
using Socialize.Modules.Identity.Models;
namespace Hutopy.Modules.Identity.Data;
namespace Socialize.Modules.Identity.Data;
public class IdentityService(
UserManager userManager,
@@ -65,4 +66,23 @@ public class IdentityService(
return userRoles;
}
public async Task<IList<Claim>> GetCurrentUserClaimsAsync()
{
UserModel? currentUserModel = await GetCurrentUserAsync();
if (currentUserModel is null)
{
return [];
}
User? currentUser = await userManager.FindByIdAsync(currentUserModel.Id.ToString());
if (currentUser is null)
{
return [];
}
return await userManager.GetClaimsAsync(currentUser);
}
}