"What is your ValidateIPAddress method code inside?" ==>It checks allowed IP address for user if that user is flagged to validate.
Do you do ip restriction for the whole project or only for specific endpoints? ==>Whole
If the user has ip authorization, will the application check the normal permissions or bypass it and authorize user? ==>It will check rest permissions as it is but first we want to validate IPaddress.
We are using .Net Core 2.1.
AspNetZero (Paid) Product version --> 4.0 Product type --> MVC Product framework type --> .net core
Can you please reply us ? what should we do ?
Are you talking about Zero? --> Yes
What is your product version? --> 4.0
What is your product type (Angular or MVC)? --> MVC
What is product framework type (.net framework or .net core)? --> .net core
Or is it a free startup template for ABP? --> No it is not free startup it is paid.
For reproducing that issue we need to enable multitenancy. Could you please create one Tenant for this demo so we can test on that Tenant.
Thanks.
1)LoadStop.Web.MVC\Areas\App\Views\Shared\Components\AppDefaultBrand\Default.chtml
We have one "AppLogo" img tag with following src attribute on above page: src="@headerViewModel.GetLogoUrl(ApplicationPath, UiThemeCustomizer.IsTopMenuUsed || UiThemeCustomizer.IsTabMenuUsed ? UiThemeCustomizer.HeaderSkin: UiThemeCustomizer.LeftAsideAsideSkin)"
2)LoadStop.Web.MVC\Areas\App\Models\Layout\HeaderViewModel.cs
public string GetLogoUrl(string appPath, string menuSkin) { if (LoginInformations?.Tenant?.LogoId == null) { return appPath + $"Common/Images/app-logo-on-{menuSkin}.png"; }
//id parameter is used to prevent caching only.
return appPath + "TenantCustomization/GetLogo?id=" + LoginInformations.Tenant.LogoId;
}
3)LoadStop.Web.Core\Controllers\TenantCustomizationController.cs
[AllowAnonymous] public async Task<ActionResult> GetLogo() {
try
{
var tenant = await _tenantManager.GetByIdAsync(AbpSession.GetTenantId());
if (!tenant.HasLogo())
{
return StatusCode((int)HttpStatusCode.NotFound);
}
var logoObject = await _binaryObjectManager.GetOrNullAsync(tenant.LogoId.Value);
if (logoObject == null)
{
return StatusCode((int)HttpStatusCode.NotFound);
}
return File(logoObject.Bytes, tenant.LogoFileType);
}
catch (System.Exception ex)
{
Logger.Error("Catch-Exception in GetLogo: " + ex.Message);
throw;
}
}
==========================================================================================
For our system, 3rd method "GetLogo" gets called and but AbpSession.GetTenantId()=null so it throws catch exception as per below: https://forum.aspnetboilerplate.com/viewtopic.php?p=21747
Above issue is same as my issue.
You can reproduce this issue on any of multi-tenancy enabled asp.net zero demo project where you can upload custom logo by tenant login and see that logo is being displayed on top left corner of header or not.
Could you please show me how can i override INavigationManager and use isvisible property with session variable ?