Closed sbonelo-nje closed 3 months ago
Going through the pull requests, I realize that the middleware was recently introduced on this #808d1d1 pull.
I'm still not sure how it is being missed when the distribution is being compiled?
UPDATE : Silly me! The update is only a few days old in the repo, no release has been made that includes the middleware 😅.
I have a new question now, when can we expect a new release?
I haven't done a release yet, but I can do one now. The process is manual as we don't have an automatic release job.
If you're installing from git, yes, it should be there. Otherwise, gimme a min and I'll put out a new version.
Greatly appreciated 👏🙏 @Dresdn
Going through the docs to configure dtu, the docs mention the TenantAccessMiddleware. Looking at the source code, it looks as the middleware is the one that handles granting/denying access to the global user on a tenant.
Installing the package following the docs and setting up the middleware raises a ModuleNotFoundError for the middleware module.
Taking a look at the libs in the venv, the middleware is indeed missing from the dtu package and it seems it has not really been in the package since the beginning (the previous releases all are the module as well).
The test app on the repo also does not have the middleware installed, not sure whether this is related to the module itself missing from the distrubuted versions and is intentional or some other reason is there.
Expected Behavior
Upon following the docs to install dtu, everything should proceed to work fine.
Actual Behavior
A ModuleNotFoundError is raised for the middleware module.
Possible Fix
Including the module in the released distributions.
Steps to Reproduce
Your Environment
Relevant details about the environment I experienced the bug in.
Version used:
Django Tenant Users 1.4.0
Environment name and version (e.g. Django 3.2.15, pip 9.0.1):
Python 3.10.6
Django 4.2.13
Django Tenants 3.6.1
Operating System and version:
Ubuntu 22.04