mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
Revert a few unecessary changes / polish code
This commit is contained in:
parent
78a2d012bb
commit
4a15358ed9
2 changed files with 8 additions and 6 deletions
|
@ -1338,7 +1338,7 @@ dyndns:
|
|||
tools:
|
||||
category_help: Specific tools
|
||||
actions:
|
||||
|
||||
|
||||
### tools_adminpw()
|
||||
adminpw:
|
||||
action_help: Change password of admin and root users
|
||||
|
@ -1366,6 +1366,9 @@ tools:
|
|||
postinstall:
|
||||
action_help: YunoHost post-install
|
||||
api: POST /postinstall
|
||||
configuration:
|
||||
# We need to be able to run the postinstall without being authenticated, otherwise we can't run the postinstall
|
||||
authenticate: false
|
||||
arguments:
|
||||
-d:
|
||||
full: --domain
|
||||
|
@ -1373,7 +1376,7 @@ tools:
|
|||
extra:
|
||||
ask: ask_main_domain
|
||||
pattern: *pattern_domain
|
||||
required: False
|
||||
required: True
|
||||
-p:
|
||||
full: --password
|
||||
help: YunoHost admin password
|
||||
|
|
|
@ -34,7 +34,7 @@ import string
|
|||
import subprocess
|
||||
import copy
|
||||
|
||||
from moulinette import m18n
|
||||
from moulinette import msignals, msettings, m18n
|
||||
from moulinette.utils.log import getActionLogger
|
||||
from moulinette.utils.filesystem import read_json, write_to_json, read_yaml, write_to_yaml
|
||||
|
||||
|
@ -126,8 +126,7 @@ def user_create(operation_logger, username, firstname, lastname, domain, passwor
|
|||
|
||||
# Ensure sufficiently complex password
|
||||
assert_password_is_strong_enough("user", password)
|
||||
from moulinette import msignals, msettings, m18n
|
||||
from yunohost.domain import domain_list
|
||||
|
||||
if domain is None:
|
||||
if msettings.get('interface') == 'api':
|
||||
raise YunohostError('Invalide usage, specify domain argument')
|
||||
|
@ -141,7 +140,7 @@ def user_create(operation_logger, username, firstname, lastname, domain, passwor
|
|||
if domain not in domain_list()['domains']:
|
||||
raise YunohostError('domain_unknown', domain)
|
||||
|
||||
mail=username+'@'+ domain
|
||||
mail = username + '@' + domain
|
||||
ldap = _get_ldap_interface()
|
||||
|
||||
if username in user_list()["users"]:
|
||||
|
|
Loading…
Add table
Reference in a new issue