Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description of the Change
Currently, if you sign in to one website, you are signed in on all the other subdomains. For example if you sign in to
utn.se
you are automatically signed in toapply.utn.se
,balen.utn.se
etc. This is because all subdomains share the same session and it comes from the setting SESSION_COOKIE_DOMAIN insettings/production.py
which is set to.utn.se
i.e. all domains that end withutn.se
. However, you can't sign in onutnarm.se
, as mentioned in #449, since it is a different domain fromutn.se
and this setting is the reason why. This PR solves thatThe solution is to remove this setting and go with the default and traditional behavior which is that each domain has their own separate session, as described in the django documentation. This means that if you sign in to
utn.se
, you will no longer be automatically signed in toapply.utn.se
or any of the other domains. Instead you will have to sign in to them individually. But this will make it possible to sign in toutnarm.se
and any other domains in the future.Applicable Issues
Closes #449