Revert "[fix] Can't restore app on a root domain"

This commit is contained in:
Laurent Peuch 2016-11-25 00:15:03 +01:00 committed by GitHub
parent a37b346632
commit 246de6f866

View file

@ -909,6 +909,10 @@ def app_checkurl(auth, url, app=None):
raise MoulinetteError(errno.EINVAL, m18n.n('domain_unknown'))
if domain in apps_map:
# Domain already has apps on sub path
if path == '/':
raise MoulinetteError(errno.EPERM,
m18n.n('app_location_install_failed'))
# Loop through apps
for p, a in apps_map[domain].items():
# Skip requested app checking
@ -918,7 +922,7 @@ def app_checkurl(auth, url, app=None):
if path == p:
raise MoulinetteError(errno.EINVAL,
m18n.n('app_location_already_used'))
elif path.startswith(p) or p.startswith(path):
elif path.startswith(p):
raise MoulinetteError(errno.EPERM,
m18n.n('app_location_install_failed'))