Skip to content

Commit

Permalink
apps: people insist on trying to install Nextcloud after creating a u…
Browse files Browse the repository at this point in the history
…ser called nextcloud ... So let's check this stupid case
  • Loading branch information
alexAubin committed Jan 21, 2024
1 parent 4ed5e1b commit fc12cb1
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/app.py
Expand Up @@ -1068,6 +1068,7 @@ def app_install(
)
from yunohost.regenconf import manually_modified_files
from yunohost.utils.legacy import _patch_legacy_php_versions, _patch_legacy_helpers
from yunohost.user import user_list

# Check if disk space available
if free_space_in_directory("/") <= 512 * 1000 * 1000:
Expand All @@ -1091,6 +1092,9 @@ def app_install(

app_id = manifest["id"]

if app_id in user_list()["users"].keys():
raise YunohostValidationError(f"There is already a YunoHost user called {app_id} ...", raw_msg=True)

# Check requirements
for name, passed, values, err in _check_manifest_requirements(
manifest, action="install"
Expand Down

0 comments on commit fc12cb1

Please sign in to comment.