diff --git a/Dockerfile b/Dockerfile index 7205d5ca5bfbb891a3b1df4c2a73855c066ca6ab..f22c97ae5cc715efbe9dc16cef1a77525f14636e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -245,6 +245,8 @@ RUN sed -i "s/field === 'displayname'//" ${BASE_DIR}/apps/settings/js/federation # Seds to allow deletion of LDAP users RUN sed -i "s/return in_array(\$user->getBackendClassName(), \['Database', 'Guests'\]);/return in_array(\$user->getBackendClassName(), ['Database', 'Guests', 'LDAP']);/" ${BASE_DIR}/custom_apps/drop_account/lib/Service/DeletionCapabilityService.php +# Optimize user-count check: search with limit 2 instead of full count +RUN sed -i "s/return \$this->userManager->countUsers() < 2;/return count(\$this->userManager->search('', 2)) < 2;/" ${BASE_DIR}/custom_apps/drop_account/lib/Service/DeletionCapabilityService.php # Add id to delete account settings section and hide it by default RUN sed -i 's/"NcSettingsSection",{attrs:{/"NcSettingsSection",{attrs:{id:"delete-account-settings-section",style:"visibility:hidden;",/' ${BASE_DIR}/custom_apps/drop_account/js/drop_account-personal-settings.mjs