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,18 +0,0 @@
using Microsoft.AspNetCore.Identity.EntityFrameworkCore;
namespace Hutopy.Modules.Identity.Data;
public class IdentityDbContext(
DbContextOptions<IdentityDbContext> options)
: IdentityDbContext<User, Role, Guid>(options)
{
public const string SchemaName = "Identity";
protected override void OnModelCreating(ModelBuilder
modelBuilder)
{
base.OnModelCreating(modelBuilder);
modelBuilder.HasDefaultSchema(SchemaName);
}
}

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);
}
}

View File

@@ -1,6 +1,6 @@
using Microsoft.AspNetCore.Identity;
namespace Hutopy.Modules.Identity.Data;
namespace Socialize.Modules.Identity.Data;
public class Role : IdentityRole<Guid>
{

View File

@@ -1,7 +1,7 @@
using System.ComponentModel.DataAnnotations;
using Microsoft.AspNetCore.Identity;
namespace Hutopy.Modules.Identity.Data;
namespace Socialize.Modules.Identity.Data;
public class User : IdentityUser<Guid>
{

View File

@@ -1,7 +1,7 @@
using Microsoft.AspNetCore.Identity;
using Microsoft.Extensions.Options;
namespace Hutopy.Modules.Identity.Data;
namespace Socialize.Modules.Identity.Data;
public sealed class UserManager(
IUserStore<User> store,