mirror of
https://github.com/nsupdate-info/nsupdate.info.git
synced 2026-04-25 08:35:56 +03:00
[GH-ISSUE #33] add a remember-me per-user profile setting #31
Labels
No labels
bug
bug
duplicate
easy
easy
enhancement
enhancement
invalid
needs help
pull-request
scalability
security
task
urgent
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/nsupdate.info-nsupdate-info#31
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @ThomasWaldmann on GitHub (Oct 22, 2013).
Original GitHub issue: https://github.com/nsupdate-info/nsupdate.info/issues/33
Some users may want to use rather short term sessions (cookie gets deleted on browser close) while other may want to stay logged in if they close and reopen the browser.
@ThomasWaldmann commented on GitHub (Nov 6, 2013):
From https://docs.djangoproject.com/en/1.5/topics/http/sessions/ :
"""
By default, SESSION_EXPIRE_AT_BROWSER_CLOSE is set to False, which means session cookies will be stored in users’ browsers for as long as SESSION_COOKIE_AGE. Use this if you don’t want people to have to log in every time they open a browser.
This setting is a global default and can be overwritten at a per-session level by explicitly calling the set_expiry() method of request.session as described above in using sessions in views.
"""
@ThomasWaldmann commented on GitHub (Nov 12, 2013):
to implement this, we first need to have custom "profile values" in the db.
what's the better way to do that?
a) https://docs.djangoproject.com/en/1.5/topics/auth/customizing/#extending-the-existing-user-model
(the profile model described there, with a one-to-one relationship to User model)
b) https://docs.djangoproject.com/en/1.5/topics/auth/customizing/#substituting-a-custom-user-model
aside from using some way to implement this in our app, it maybe should be discussed with django people whether this does not rather belong into the framework as it only makes a feature user setting that is already supported, but only globally configurable by the framework.
it's also related to security, privacy and ease-of-use whether one rather wants a permanent cookie store on the machine with a default lifetime of 2 weeks or a session cookie, that is deleted when browser is closed.
@ThomasWaldmann commented on GitHub (Nov 14, 2013):
http://stackoverflow.com/questions/15100400/django-remember-me-with-built-in-login-view-and-authentication-form
https://pypi.python.org/pypi/django-auth-remember/0.3 (see also links there)
@ThomasWaldmann commented on GitHub (Nov 14, 2013):
for security reasons, default is a session cookie now that clears on browser close, see
182671783d@ThomasWaldmann commented on GitHub (Nov 16, 2013):
done
56341d0581