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

Commit 98f7ddb9 authored by AVINASH GUSAIN's avatar AVINASH GUSAIN
Browse files

updated app config and user config

parent 4fe61ba1
Loading
Loading
Loading
Loading
Loading
+8 −7
Original line number Diff line number Diff line
@@ -4,22 +4,24 @@ 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,14 @@
@@ -9,12 +9,16 @@
 namespace OCA\Settings\Settings\Personal\Security;
 
 use OCP\AppFramework\Http\TemplateResponse;
+use OCP\IConfig;
+use OCP\IAppConfig;
+use OCP\IUserConfig;
 use OCP\IUserManager;
 use OCP\Settings\ISettings;
 
 class Password implements ISettings {
 
 	public function __construct(
+		private IConfig $config,
+		private IAppConfig $appConfig,
+		private IUserConfig $userConfig,
 		private IUserManager $userManager,
 		private ?string $userId,
 	) {
@@ -33,10 +35,25 @@
@@ -33,10 +37,25 @@
 	}
 
 	public function getSection(): string {
@@ -38,12 +40,11 @@ Subject: [PATCH] Hide password settings section when encryption is enabled
+			return false;
+		}
+
+		if (!$this->config->getSystemValueBool('passwords.enable_change_password_form', false)) {
+		if (!$this->appConfig->getValueBool('passwords', 'enable_change_password_form', false)) {
+			return false;
+		}
+
+		return $this->config->getUserValue($this->userId, 'passwords', 'defaultE2eeFlowEnabled', '0') !== '1';
+		return $this->userConfig->getUserValueString('passwords', 'defaultE2eeFlowEnabled', '0') !== '1';
 	}
 }
\ No newline at end of file