Activities of "pablo@ccalp.net"

Thanks for your prompt response, maybe I didn't explain well the scenario, hopefully, this diagram will help. I need to implement multiple Hybrid architectures where some tenants share a single database while some tenants may have their own database.

Answer

How can I use my own guard in the "route.provider.ts"
I need to hide/show menu items based on my own logic, not the "requiredPolicy" property.

Hello, can you try invisible property for that please?

That is a boolean property, I need to pass a function so that it is evaluated, at the moment when the data is available. Is there a way to see the source of the navigation menu component, maybe I can create my own based on that one and replace it.

Answer

Ok, I'll try that, I think it would be a cleaner implementation.

What about this question I posted before:

How can I use my own guard in the "route.provider.ts" I need to hide/show menu items based on my own logic, not the "requiredPolicy" property.

Answer

If I do that, what would happen with the abp framework's policies, would they still work?

Answer

Yeah, I figured it out. Thanks for the help.

Answer

I implemented a custom PolicyProvider to handlemy permissions, but I'm getting an exception on some of the ABP features. When trying to access SaaS, TextTemplates, Chat, etc.

System.InvalidOperationException: The AuthorizationPolicy named: 'Saas.Editions' was not found.

How do I add my custom dynamic policy provider without colliding with ABP?

Exception:

2023-07-26 10:16:48.811 -04:00 [INF] Executing endpoint 'Volo.Saas.Host.TenantController.GetListAsync (Volo.Saas.Host.HttpApi)'
2023-07-26 10:16:48.819 -04:00 [INF] Route matched with {controller = "Tenant", area = "saas", action = "GetList", page = ""}. Executing controller action with signature System.Threading.Tasks.Task`1[Volo.Abp.Application.Dtos.PagedResultDto`1[Volo.Saas.Host.Dtos.SaasTenantDto]] GetListAsync(Volo.Saas.Host.Dtos.GetTenantsInput) on controller Volo.Saas.Host.TenantController (Volo.Saas.Host.HttpApi).
2023-07-26 10:16:48.819 -04:00 [ERR] An unhandled exception has occurred while executing the request.
System.InvalidOperationException: The AuthorizationPolicy named: 'Saas.Editions' was not found.
   at Microsoft.AspNetCore.Authorization.AuthorizationPolicy.CombineAsync(IAuthorizationPolicyProvider policyProvider, IEnumerable`1 authorizeData, IEnumerable`1 policies)
   at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)
   at Volo.Abp.AspNetCore.Uow.AbpUnitOfWorkMiddleware.InvokeAsync(HttpContext context, RequestDelegate next)
   at Microsoft.AspNetCore.Builder.UseMiddlewareExtensions.<>c__DisplayClass6_1.<<UseMiddlewareInterface>b__1>d.MoveNext()
--- End of stack trace from previous location ---
   at Volo.Abp.AspNetCore.ExceptionHandling.AbpExceptionHandlingMiddleware.InvokeAsync(HttpContext context, RequestDelegate next)
   at Volo.Abp.AspNetCore.ExceptionHandling.AbpExceptionHandlingMiddleware.InvokeAsync(HttpContext context, RequestDelegate next)
   at Microsoft.AspNetCore.Builder.UseMiddlewareExtensions.<>c__DisplayClass6_1.<<UseMiddlewareInterface>b__1>d.MoveNext()
--- End of stack trace from previous location ---
   at Volo.Abp.AspNetCore.MultiTenancy.MultiTenancyMiddleware.InvokeAsync(HttpContext context, RequestDelegate next)
   at Microsoft.AspNetCore.Builder.UseMiddlewareExtensions.<>c__DisplayClass6_1.<<UseMiddlewareInterface>b__1>d.MoveNext()
--- End of stack trace from previous location ---
   at Microsoft.AspNetCore.Builder.ApplicationBuilderAbpOpenIddictMiddlewareExtension.<>c__DisplayClass0_0.<<UseAbpOpenIddictValidation>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
   at Volo.Abp.AspNetCore.Security.AbpSecurityHeadersMiddleware.InvokeAsync(HttpContext context, RequestDelegate next)
   at Microsoft.AspNetCore.Builder.UseMiddlewareExtensions.<>c__DisplayClass6_1.<<UseMiddlewareInterface>b__1>d.MoveNext()
--- End of stack trace from previous location ---
   at Microsoft.AspNetCore.Localization.RequestLocalizationMiddleware.Invoke(HttpContext context)
   at Microsoft.AspNetCore.RequestLocalization.AbpRequestLocalizationMiddleware.InvokeAsync(HttpContext context, RequestDelegate next)
   at Microsoft.AspNetCore.Builder.UseMiddlewareExtensions.<>c__DisplayClass6_1.<<UseMiddlewareInterface>b__1>d.MoveNext()
--- End of stack trace from previous location ---
   at Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddlewareImpl.Invoke(HttpContext context)

Answer

How can I use my own guard in the "route.provider.ts" I need to hide/show menu items based on my own logic, not the "requiredPolicy" property.

One more questions: What do I have to do to merge the host and the tenant DbContext, so basically not to separate the host from the tenant databases.

Ok, so if I wanted to add a foreign key in the AbpUsers to another table, that table must exist in the Host and the Tenant databases, right? BTW, I have the host and tenant DbContexts separated.

I cannot share my project and will take too long to create a sample with the right conditions. My use case is very simple: Is it possible to tell the ObjectExtensionManager that the mappings are just for the Tenant and not for the host? Just like when creating the model builder.SetMultiTenancySide(MultiTenancySides.Tenant);

Or is there any other way to add the additional columns to the AbpUsers table?

Showing 21 to 30 of 46 entries
Made with ❤️ on ABP v9.0.0-preview Updated on September 20, 2024, 08:30