Base solution for your next web application
Starts in:
01 DAYS
01 HRS
01 MIN
01 SEC

Activities of "codenewa"

@ismcagdas,

I'm using the angular+asp.net core version. Here're the package versions I've in my project:

abp-ng2-module: ^1.2.0 abp-web-resources:^2.2.1

Were you guys able to figure out what was happening? I'm facing a similar issue as well.

Yeah. that was the case . :( Thank you for that.

public class TenantCustmozation_Tests : AppTestBase
    {
        private readonly TenantCustomizationAppService _app;

        public TenantCustmozation_Tests()
        {
            _app = Resolve<TenantCustomizationAppService>();
        }
     
        [Fact]
        public async Task App_returns_tenantCustomization_if_present()
        {
            LoginAsDefaultTenantAdmin();

            var uowManager = Resolve<IUnitOfWorkManager>();

            using (uowManager.Begin())
            {
                UsingDbContext(
                    ctx =>
                    {
                        ctx.Customizations.Add(new PatientPortal.POS.TenantCustomization
                        {
                            LoginBodyText = "Hello",
                            TenantId = AbpSession.TenantId.Value
                        });


                    });

                var result = await _app.GetCustomizations();

                result.ShouldNotBeNull();

                result.LoginBodyText.ShouldBe("Hello");
            }
        }

This is the working test. When I remove the uowManager.Begin(), the test fails because the DbContext has already been disposed when it reaches the _app.GetCustomizations() call.

Yup! That was the issue. Thank you.

The [Audited] attribute worked. The username, client, ipaddress and browser are null but that would be as expected.

Thanks I'll try out the BackgroundJobInfo.DefaultWaitFactor = 0 for single attempt jobs.

For the Auditing, I did take a look at it but since it needed the tenantId and userid, I didn't think that it'd work. I was not sure where the background job would produce those values.

Thank you that worked.

Scenario:

In the application, the host creates entities: Package1, Package2. There are Tenants => Tenant1, Tenant2 Host assigns packages to tenants. So, we have tenantpackages: TP1 => Tenant1+Package1 for Tenant 1 TP2 => Tenant1+Package2 for Tenant 1 TP3 => Tenant2+Package1 for Tenant 2

Tenant1 also creates a new package: Package3 which will create a tenantPackage entity (TP4=> Tenant1+Package3).

Here, Tenant1 has full control over Package3. But neither Host nor Tenant2 are able to see Package3. So, Host won't be able to create a tenantpackage (TP5) such that TP5= Tenant2+Package3.

To allow for this, I was thinking following.

  1. Package will be IMayHaveTenant because it can be created by both Host and Tenants, but only the creator can update them.
  2. TenantPackage will be IMustHaveTenant because it needs to have a tenant and other tenants shouldn't see it.

Am I going in the wrong direction?

I'm looking at it now. But I'm not sure how to query across the tenants. Do you have documentation on that?

Showing 1 to 10 of 15 entries