« Previous | Next » 

Revision 1808f7bc

ID1808f7bcca68f04bab82d51aec9e524a4d5d6a00

Added by Giorgos Korfiatis over 7 years ago

astakos: Refactor user creation

Provide auth.make_user() as the single way to create a new user. This
function is responsible to set all automatically generated fields, such as
username, uuid, and token. Clean up AstakosUser.save(), that used to
update these fields, and remove AstakosUser.__init__(). Remove trigger
that renewed token on every AstakosUser update. In order to set a user's
email, use AstakosUser.set_email(); this takes care to update the
username, too.

Provide function create_user() in user creation forms, which calls
auth.make_user() with the form-provided data.

Use the wrapper auth.make_local_user() in management command `user-add'.

Use the same infrastructure to extend a django superuser to an AstakosUser
(in management command `fix-superusers').

Files

  • added
  • modified
  • copied
  • renamed
  • deleted

View differences