Nice to add the forms, but could we simplify the logic? (e.g. make it readable without hard thinking)
defensive also means we should init it to 'True'
This is complicated to follow. Couldn't we manage the cases independently? e.g. 1) is first user, get him from the form 2) check auth 3) if new user not ok delete him 4) if new user ok createhome dir
HUE-408 [desktop] User creation form usage when first creating a user
Review Request #2521 — Created Dec. 12, 2012 and submitted
commit 40012f00b8e1eb6b0ee1cb755802341801b6f8de Author: abec <email@example.com> Date: Tue Dec 11 19:22:48 2012 -0800 HUE-408 [desktop] User creation form usage when first creating a user Added custom auth and user creation forms to validate authentication and user creation. Added defensive logic around creating first user. Added test case to ensure this. :000000 100644 0000000... f87ac09... A desktop/core/src/desktop/auth/forms.py :100644 100644 88a8678... 5438fa4... M desktop/core/src/desktop/auth/views.py :100644 100644 2a0ad6e... 0a91847... M desktop/core/src/desktop/auth/views_test.py :100644 100644 4bac816... abbf9b6... M desktop/core/src/desktop/templates/login.mako :100644 100644 e908fdd... 003212c... M desktop/core/src/desktop/views.py
Manual + test slow