mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-11-29 08:25:10 +00:00
Create POSIX user during firstboot. Closes #31.
This commit is contained in:
1 parent
4581785519
commit
1a081bfab0
2 files changed
+42
No files matched your search
@@ -20,6 +20,7 @@ from django.contrib import auth, messages
|
||||
from django.core import validators
|
||||
from gettext import gettext as _
|
||||
|
||||
from plinth import actions
|
||||
from plinth.modules.config import config
|
||||
|
||||
|
||||
@@ -58,6 +59,9 @@ than 63 characters in length.'),
|
||||
user.set_password(self.cleaned_data['password'])
|
||||
if commit:
|
||||
user.save()
|
||||
actions.superuser_run(
|
||||
'create-user',
|
||||
[user.username, self.cleaned_data['password']])
|
||||
self.login_user()
|
||||
|
||||
return user
|
||||
|
||||
Reference in new issue
Block a user