Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature/EXT-1 #2

Merged
merged 2 commits into from
Jul 3, 2019
Merged

feature/EXT-1 #2

merged 2 commits into from
Jul 3, 2019

Conversation

EugeneKovalev
Copy link
Contributor

What:

  • Allow setting a User model which differs from the common AUTH_USER_MODEL using LOGGING_USER_MODEL.
  • If LOGGING_USER_MODEL is not set then use AUTH_USER_MODEL (in order not to spoil previous functionality)

Why:

  • Currently _local.user = request.user.
    In rare occasions, request.user does not stand for django_users. This case might be represented as a result of merging 2 or more enormously large projects. Or gradual move from one type of DB to another. Or the interaction of multiple systems which use their own users but still it represents the same instance.
    As a result, there'd be multiple users tables in different DBs which are impossible to be merged into a single django_users at the moment.

To conclude, Django can work with multiple DBs then request.user can be represented not by AUTH_USER_MODEL but by something else.

@legion-an legion-an merged commit 873860d into legion-an:master Jul 3, 2019
creyD added a commit that referenced this pull request Mar 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants