Hi,
See https://support.abp.io/QA/Questions/186/How-can-I-customize--change-logo-and-change-position
You can try use https://github.com/borisdj/EFCore.BulkExtensions
I think your main problem has been resolved, so will close the ticket.
Hi,
Can I check it remotely? shiwei.liang@volosoft.com
HI,
Actually this is by design, see: https://github.com/abpframework/abp/issues/1731#issuecomment-529288042.
You need to create api controller in the HttpApi
project.
Hi,
Because the database is tenant isolated, I think you can create the same user in each tenant for users with x role.
Hi,
Will this problem also occur if you use a new project to generate a crud page?
PS: You can upgrade CLI and suite to 4.4.0 rc.2 version and try again:
dotnet tool uninstall --global Volo.Abp.Cli
dotnet tool install --global Volo.Abp.Cli --version 4.4.0-rc.2
abp suite update --preview
HI,
You mean use CLI to send a Http request to app service, right?
See: https://docs.abp.io/en/abp/latest/Multi-Tenancy#tenant-resolvers
Pass the tenant in the query string:
httpClient.RequestTokenAsync(new TokenRequest()
{
Address = "https://demo.identityserver.io/connect/token?__tenant=xxx", pass the tenant
GrantType = "password",
ClientId = "client",
ClientSecret = "secret",
Parameters =
{
{"username", "xxx"},
{"password", "xxx"}
}
});
HI,
You can create a shared entityframeworkcore
project used to share the database
Hi,
Okay, thanks.
Hi,
This is the design of the Aspnet Core Identity, I would like to suggest that don't change it if you don't have to
However, you can change it:
[Dependency(ReplaceServices = true)]
[ExposeServices(typeof(IdentityUserManager))]
public class MyUserManager : IdentityUserManager
{
public MyUserManager(
IdentityUserStore store,
IIdentityRoleRepository roleRepository,
IIdentityUserRepository userRepository,
IOptions<IdentityOptions> optionsAccessor,
IPasswordHasher<IdentityUser> passwordHasher,
IEnumerable<IUserValidator<IdentityUser>> userValidators,
IEnumerable<IPasswordValidator<IdentityUser>> passwordValidators,
ILookupNormalizer keyNormalizer,
IdentityErrorDescriber errors,
IServiceProvider services,
ILogger<IdentityUserManager> logger,
ICancellationTokenProvider cancellationTokenProvider,
IOrganizationUnitRepository organizationUnitRepository,
ISettingProvider settingProvider) :
base(store,
roleRepository,
userRepository,
optionsAccessor,
passwordHasher,
userValidators,
passwordValidators,
keyNormalizer,
errors,
services,
logger,
cancellationTokenProvider,
organizationUnitRepository,
settingProvider)
{
}
public override async Task<IdentityResult> AccessFailedAsync(IdentityUser user)
{
ThrowIfDisposed();
var store = GetUserLockoutStore();
if (user == null)
{
throw new ArgumentNullException(nameof(user));
}
// If this puts the user over the threshold for lockout, lock them out and reset the access failed count
var count = await store.IncrementAccessFailedCountAsync(user, CancellationToken);
if (count < Options.Lockout.MaxFailedAccessAttempts)
{
return await UpdateUserAsync(user);
}
Logger.LogWarning(12, "User is locked out.");
await store.SetLockoutEndDateAsync(user, DateTime.Now.Add(Options.Lockout.DefaultLockoutTimeSpan),
CancellationToken);
await store.ResetAccessFailedCountAsync(user, CancellationToken);
return await UpdateUserAsync(user);
}
public override async Task<bool> IsLockedOutAsync(IdentityUser user)
{
ThrowIfDisposed();
var store = GetUserLockoutStore();
if (user == null)
{
throw new ArgumentNullException(nameof(user));
}
if (!await store.GetLockoutEnabledAsync(user, CancellationToken))
{
return false;
}
var lockoutTime = await store.GetLockoutEndDateAsync(user, CancellationToken);
return lockoutTime >= DateTime.Now;
}
private IUserLockoutStore<IdentityUser> GetUserLockoutStore()
{
var cast = Store as IUserLockoutStore<IdentityUser>;
return cast;
}
}