-
-
-
-
desktop/core/src/desktop/templates/login.mako (Diff revision 1) this looks like a big hack could we set the error in the form and raise a validation exception? (prefered) or check user.is_active if it works
HUE-2010 [core] Configure Hue to terminate users who has not logged in X days
Review Request #4223 — Created March 4, 2014 and submitted
Information | |
---|---|
abec | |
old-hue-rw | |
HUE-2010 | |
Reviewers | |
hue | |
enricoberti, romain |
commit 77d0c4949faa229e44c9e98f2f950e11c84ff22d Author: Abraham Elmahrek <abraham@elmahrek.com> Date: Tue Mar 4 15:03:12 2014 -0800 HUE-2010 [core] Configure Hue to terminate users who has not logged in X days Added logic to AuthenticationForm. Made it so that all backends return a User object even if it is inactive. This make it easier to see the correct error message. Even superuser accounts are subject to this policy. :100644 100644 f3b6aba... 58aa316... M desktop/conf.dist/hue.ini :100644 100644 8132770... 4b9055f... M desktop/conf/pseudo-distributed.ini.tmpl :100644 100644 286ecb5... 712d794... M desktop/core/src/desktop/auth/backend.py :100644 100644 9901e4c... 3ccb98f... M desktop/core/src/desktop/auth/forms.py :100644 100644 88f6a6f... b9da19f... M desktop/core/src/desktop/auth/views.py :100644 100644 0c56c6c... b599c77... M desktop/core/src/desktop/auth/views_test.py :100644 100644 eb06e85... 3b8771f... M desktop/core/src/desktop/conf.py :100644 100644 2135aae... 8199d2c... M desktop/core/src/desktop/templates/login.mako
Tested new users and existing users. Set "expires_after" to 0 and saw that after creating a user, it was immediately disabled. Also added a test.
-
Oups, clicked by mistake! Pretty good, just a few comments!
-
desktop/conf/pseudo-distributed.ini.tmpl (Diff revision 2) Probably should add a: # Apply only to AllowFirstUserDjangoBackend, LdapBackend
-
-
desktop/core/src/desktop/auth/forms.py (Diff revision 2) Would it make sense to add a help like: Please contact an <a>admin</a> (mailto link with first admin from settings.ADMINS?)
-
desktop/core/src/desktop/auth/forms.py (Diff revision 2) Account deactivated as inactive. This is simpler. Even maybe raise this message for 'inactive'
-
-
desktop/core/src/desktop/lib/python_util.py (Diff revision 2) probably to remove as not used and not i18ned