Starts in:
2 DAYS
2 HRS
9 MIN
50 SEC
Starts in:
2 D
2 H
9 M
50 S

Activities of "dboutwell"

Nevermind, I figured this out. My sleep deprived self was putting the dropdownParent value inside the AJAX options.

Feature Request : Custom HTTPS Responses for AppServices

I would like the ability to customize my AppServices and be able to specify exactly what HTTP Status code gets returned by a particular response in order to better integrate the with external APIs using industry standard conventions. For example, the one that always bites is when the system sends an HTTP200 response when the user needs to authenticate.

I am not sure how this would look in implementation, but it would go a long way towards making the framework more extensible and integratable, in my opinion.

Did you check out https://docs.abp.io/en/abp/latest/Exception-Handling#http-status-code-mapping

I had not seen that, thank you! I will check it out.

Feature Request : Custom HTTPS Responses for AppServices

I would like the ability to customize my AppServices and be able to specify exactly what HTTP Status code gets returned by a particular response in order to better integrate the with external APIs using industry standard conventions. For example, the one that always bites is when the system sends an HTTP200 response when the user needs to authenticate.

I am not sure how this would look in implementation, but it would go a long way towards making the framework more extensible and integratable, in my opinion.

Just wanted to confirm that I was able to implement the workaround for the time being and everything is running smoothly. Thank you for your help.

We are aware of this issue, it will be fixed with the patch version soon. As a workaround, you need to override ContactPublicController's SendMessageAsync method and delete the reCAPTCHA related code, also you need to override the Contact component's default.js and assign a value to its RecaptchaToken because RecaptchaToken Required attribute is added in ContactCreateInput.

I don't have the source code for that module and my license doesn't support me downloading it, can you send me the SendMessageAsync code as it sits now so I can override?

Right, I get that and can do that easy enough, but how do the tenants authenticate to the API so that the TenantId and CurrentUser stuff is populated?

I am still confused. I have used the feature system to enable and disable certain functionality, but I'm not sure how to accomplish what you are suggesting with it. I just want to offer my customers a way to authenticate their applications and code to consume the API endpoints generated by the framework here and to take advantage of all of the fantastic work you guys did with the data filtering

Identity client is used for front-end (angular, mvc, blazor, console....), not Tenant.

Ok, this makes sense. So what is the recommended approach within the ABP framework if I wanted to extend some of the API functionality to tenants?

Not sure if this will be made public, but the solution I landed on was overriding the FindByNameAsync method in the EfCoreTenantRepository class so that the tenant creation process and the the domain resolver will both be operating out of the same playbook.

It's probably not the most efficient code, but this is what that override class looks like now:

[Dependency(ReplaceServices = true)]
    public class CustomTenantRepository : EfCoreTenantRepository
    {
        public CustomTenantRepository(IDbContextProvider<ISaasDbContext> dbContextProvider)
            : base(dbContextProvider)
        {

        }

        public override async Task<Tenant> FindByNameAsync(string name, bool includeDetails = true, CancellationToken cancellationToken = default)
        {
            var tenants = await (await GetDbSetAsync())
                .IncludeDetails(includeDetails)
                .OrderBy(t => t.Id).ToListAsync();


            return tenants
                .FirstOrDefault(t => (t.Name == name || TestUrlNamingConvention(t.Name,name)));
        }

        private bool TestUrlNamingConvention(string tenantName, string inputName)
        {
            var i = string.Concat(inputName.Where(c => !char.IsWhiteSpace(c))).ToLowerInvariant();
            var t = string.Concat(tenantName.Where(c => !char.IsWhiteSpace(c))).ToLowerInvariant();

            return i == t;              
        }
    }

And because I often find myself asking where I should put these, I have mine in the Project.EntityFrameworkCore project.

hi

You can custom the DomainTenantResolveContributor.

https://docs.abp.io/en/abp/latest/Multi-Tenancy#custom-tenant-resolvers

https://github.com/abpframework/abp/blob/dev/framework/src/Volo.Abp.AspNetCore.MultiTenancy/Volo/Abp/AspNetCore/MultiTenancy/DomainTenantResolveContributor.cs

That is where I started, and the domain tenant resolver does successfully match the domain value (in this case norules) from the URL but I am then pushed to a screen that simply states:

Tenant not found!

There is no tenant with the tenant id or name: norules

So what I am looking for is to modify whatever routine looks at the SaasTenants table AFTER the domain resolver pulls the deal and tell it to match on something like:

Regex.Replace(Tenant.Name, @"\s", "");

Showing 1 to 10 of 10 entries
Made with ❤️ on ABP v9.1.0-preview. Updated on November 20, 2024, 13:06