CurrentUser.TenantId != null
absolutely right!
hi
JWT has nothing to do with multi-tenancy. The framework will automatically handled If you use the IdentityServer
If you manually write code to implement JWT, you need to add the TenantId of the current user to the claims.
https://github.com/abpframework/abp/blob/dev/modules/identity/src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/AbpUserClaimsPrincipalFactory.cs#L43
Please share a simple project, thank you
liming.ma@volosoft.com
hi
You can redirect the user in Index page.
public class IndexModel : MyProjectNamePageModel
{
public Task<IActionResult> OnGetAsync()
{
if (CurrentUser.IsAuthenticated)
{
if (CurrentUser.TenantId == null)
{
return Task.FromResult<IActionResult>(Redirect("~/Dashboard"));
}
else
{
return Task.FromResult<IActionResult>(Redirect("~/HostDashboard"));
}
}
return Task.FromResult<IActionResult>(Page());
}
}
hi
What's your NuGet.Config
?
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" />
<add key="BlazoriseMyGet" value="https://www.myget.org/F/blazorise/api/v3/index.json" />
<!-- {ABP_COMMERCIAL_NUGET_SOURCE} -->
</packageSources>
</configuration>
The value 'send-email-user' is not valid for id.
I can't see why this causes this error, can you share a simple project?
Sending HTTP request POST "https://localhost:44325/api/userTask-service/task-managements/send-email-user?emailTo=srinivas.k%40exceego.com&emailBody=test&emailSubject=test&api-version=1.0" [INF] Received HTTP response headers after 2830.2244ms - 500
Can you share some code of this method? and DTO class.
hi
You should always persist the key to the database or redis, etc. If you use redis, make sure that the key is not cleared;
https://docs.identityserver.io/en/latest/topics/startup.html#key-material https://docs.microsoft.com/en-us/aspnet/core/security/data-protection/configuration/overview?view=aspnetcore-5.0
hi
Try to add format: abp.localization.currentCulture.dateTimeFormat.shortDatePattern
$dateRangePicker.datepicker({
autoclose: true,
language: abp.localization.currentCulture.cultureName,
format: abp.localization.currentCulture.dateTimeFormat.shortDatePattern
});
The value 'invite' is not valid for id The value 'send-email-user' is not valid for id
There is a problem with your request parameters. Can you share full logs?