diff --git a/Dockerfile b/Dockerfile index a6998a868d5414e7fc04aa561d8663913aab0cf9..6e5bfae6040d6ee5803e9612870f2255d9b981da 100644 --- a/Dockerfile +++ b/Dockerfile @@ -19,7 +19,7 @@ ARG MEMORIES_URL="https://github.com/pulsejet/memories/releases/download/v7.8.2/ ARG DROP_ACCOUNT_URL="https://packages.framasoft.org/projects/nextcloud-apps/drop-account/drop_account-2.7.1.tar.gz" ARG GOOGLE_INTEGRATION_URL="https://github.com/nextcloud-releases/integration_google/releases/download/v4.2.0/integration_google-v4.2.0.tar.gz" -RUN sed -i 's/32,0,6,1/32,0,6,12/' ${BASE_DIR}/version.php +RUN sed -i 's/32,0,6,1/32,0,6,13/' ${BASE_DIR}/version.php COPY custom_entrypoint.sh / RUN chmod +x /custom_entrypoint.sh RUN mkdir -p /var/www/skeleton/Documents && mkdir -p /var/www/skeleton/Images @@ -108,7 +108,7 @@ RUN patch -u ${BASE_DIR}/lib/private/L10N/Factory.php -i ${TMP_PATCH_DIR}/032-se # UserConfigChangedEvent Ref: https://github.com/nextcloud/server/pull/42039 RUN cd ${BASE_DIR} && patch -p1 < ${TMP_PATCH_DIR}/036-user-config-change-event.patch RUN patch -u ${BASE_DIR}/custom_apps/integration_google/lib/Service/GoogleDriveAPIService.php -i ${TMP_PATCH_DIR}/039-fix-slow-google-import-job.patch - +RUN patch -u ${BASE_DIR}/apps/settings/lib/Settings/Personal/Security/Password.php -i ${TMP_PATCH_DIR}/040-hide-password-setting-section-encryption-enabled.patch RUN rm -rf ${TMP_PATCH_DIR} # Custom theme diff --git a/patches/040-hide-password-setting-section-encryption-enabled.patch b/patches/040-hide-password-setting-section-encryption-enabled.patch new file mode 100644 index 0000000000000000000000000000000000000000..1f19218064b7fca4d68352102206f700ab020a5f --- /dev/null +++ b/patches/040-hide-password-setting-section-encryption-enabled.patch @@ -0,0 +1,50 @@ +From: Avinash avinashg@e.email +Date: Wed, 13 Mar 2026 15:45:00 +0530 +Subject: [PATCH] Hide password settings section when encryption is enabled + +--- ./apps/settings/lib/Settings/Personal/Security/Password.php 2026-05-13 23:38:33 ++++ ./apps/settings/lib/Settings/Personal/Security/Password-new.php 2026-05-13 23:41:36 +@@ -9,12 +9,16 @@ + namespace OCA\Settings\Settings\Personal\Security; + + use OCP\AppFramework\Http\TemplateResponse; ++use OCP\IAppConfig; ++use OCP\IUserConfig; + use OCP\IUserManager; + use OCP\Settings\ISettings; + + class Password implements ISettings { + + public function __construct( ++ private IAppConfig $appConfig, ++ private IUserConfig $userConfig, + private IUserManager $userManager, + private ?string $userId, + ) { +@@ -33,10 +37,25 @@ + } + + public function getSection(): string { ++ if ($this->shouldHideCorePasswordPanel()) { ++ return null; ++ } + return 'security'; + } + + public function getPriority(): int { + return 10; ++ } ++ ++ private function shouldHideCorePasswordPanel(): bool { ++ if ($this->userId === null) { ++ return false; ++ } ++ ++ if (!$this->appConfig->getValueBool('passwords', 'enable_change_password_form', false)) { ++ return false; ++ } ++ ++ return $this->userConfig->getUserValueString('passwords', 'defaultE2eeFlowEnabled', '0') !== '1'; + } + } +\ No newline at end of file