Skip to content

3.0.1

Latest

Choose a tag to compare

@Dresdn Dresdn released this 18 Oct 18:38

3.0.1

Fixes

  • Previous tenant owner retained access after delete_tenant(). The ownership check used a leaked loop variable instead of the actual owner, so it never fired once a tenant had more than one member. Since delete_tenant() is a soft delete and the schema survives, the affected user kept passing TenantAccessMiddleware's membership check and retained access to a tenant that had supposedly been deleted. Fixes #888 — fixed by @joefefs in #920
  • TenantAccessMiddleware rejected authenticated users when a request had no tenant attached — e.g. when django-tenants falls back to the public URLconf via SHOW_PUBLIC_IF_NO_TENANT_FOUND for a host that matches no Domain. Logged-in users hitting an unmatched host now fall through to the view layer instead of being denied. Fixes #666 and #907 — fixed by @joefefs in #921
  • delete_tenant() never released the tenant's domains, leaving their URLs permanently claimed and unavailable for reuse even though the tenant was "deleted." Domains are now deleted along with the ownership transfer. While fixing this, provision_tenant()'s generated schema name was also given a random suffix (in addition to its timestamp) to avoid collisions when re-provisioning the same slug within the same second as a deleted tenant. Fixes #922 — fixed by @joefefs in #923

Full Changelog: 3.0.0...3.0.1