Skip to content

Commit

Permalink
update default data
Browse files Browse the repository at this point in the history
  • Loading branch information
iammukeshm committed Aug 23, 2024
1 parent 45eb1d1 commit ca7ed4b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ internal static class IdentityConstants
public const string SchemaName = "identity";
public const string RootTenant = "root";
public const string DefaultPassword = "123Pa$$word!";
public const string DefaultProfilePicture = "https://localhost:7000/assets/defaults/profile-picture.webp";
public const string DefaultProfilePicture = "/assets/defaults/profile-picture.webp";

public static class Roles
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using Finbuckle.MultiTenant.Abstractions;
using FSH.Framework.Core.Origin;
using FSH.Framework.Core.Persistence;
using FSH.Framework.Core.Tenant;
using FSH.Framework.Infrastructure.Identity.RoleClaims;
Expand All @@ -9,6 +10,7 @@
using Microsoft.AspNetCore.Identity;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Options;

namespace FSH.Framework.Infrastructure.Identity.Persistence;
internal sealed class IdentityDbInitializer(
Expand All @@ -17,7 +19,8 @@ internal sealed class IdentityDbInitializer(
RoleManager<FshRole> roleManager,
UserManager<FshUser> userManager,
TimeProvider timeProvider,
IMultiTenantContextAccessor<FshTenantInfo> multiTenantContextAccessor) : IDbInitializer
IMultiTenantContextAccessor<FshTenantInfo> multiTenantContextAccessor,
IOptions<OriginOptions> originSettings) : IDbInitializer
{
public async Task MigrateAsync(CancellationToken cancellationToken)
{
Expand Down Expand Up @@ -113,7 +116,7 @@ private async Task SeedAdminUserAsync()
PhoneNumberConfirmed = true,
NormalizedEmail = multiTenantContextAccessor.MultiTenantContext.TenantInfo?.AdminEmail!.ToUpperInvariant(),
NormalizedUserName = adminUserName.ToUpperInvariant(),
ImageUrl = new Uri(IdentityConstants.DefaultProfilePicture),
ImageUrl = new Uri(originSettings.Value.OriginUrl! + IdentityConstants.DefaultProfilePicture),
IsActive = true
};

Expand Down

0 comments on commit ca7ed4b

Please sign in to comment.