Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b8cef81f authored by AVINASH GUSAIN's avatar AVINASH GUSAIN
Browse files

sed added for check only two user

parent 2d1749ec
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -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