Revert a few unecessary changes / polish code

This commit is contained in:
Alexandre Aubin 2020-08-27 17:31:17 +02:00
parent 78a2d012bb
commit 4a15358ed9
2 changed files with 8 additions and 6 deletions

View file

@ -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

View file

@ -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')