diff --git a/apps/settings/composer/composer/autoload_classmap.php b/apps/settings/composer/composer/autoload_classmap.php index cf7963ef90..3e83c20bd3 100644 --- a/apps/settings/composer/composer/autoload_classmap.php +++ b/apps/settings/composer/composer/autoload_classmap.php @@ -38,8 +38,8 @@ return array( 'OCA\\Settings\\Middleware\\SubadminMiddleware' => $baseDir . '/../lib/Middleware/SubadminMiddleware.php', 'OCA\\Settings\\Personal\\Additional' => $baseDir . '/../lib/Settings/Personal/Additional.php', 'OCA\\Settings\\Personal\\PersonalInfo' => $baseDir . '/../lib/Settings/Personal/PersonalInfo.php', - 'OCA\\Settings\\Personal\\Security' => $baseDir . '/../lib/Settings/Personal/Security.php', 'OCA\\Settings\\Personal\\Security\\Authtokens' => $baseDir . '/../lib/Settings/Personal/Security/Authtokens.php', + 'OCA\\Settings\\Personal\\Security\\Password' => $baseDir . '/../lib/Settings/Personal/Security/Password.php', 'OCA\\Settings\\Personal\\ServerDevNotice' => $baseDir . '/../lib/Settings/Personal/ServerDevNotice.php', 'OCA\\Settings\\Sections\\Admin\\Additional' => $baseDir . '/../lib/Sections/Admin/Additional.php', 'OCA\\Settings\\Sections\\Admin\\Groupware' => $baseDir . '/../lib/Sections/Admin/Groupware.php', diff --git a/apps/settings/composer/composer/autoload_static.php b/apps/settings/composer/composer/autoload_static.php index f9805dcff1..a76fe97eec 100644 --- a/apps/settings/composer/composer/autoload_static.php +++ b/apps/settings/composer/composer/autoload_static.php @@ -53,8 +53,8 @@ class ComposerStaticInitSettings 'OCA\\Settings\\Middleware\\SubadminMiddleware' => __DIR__ . '/..' . '/../lib/Middleware/SubadminMiddleware.php', 'OCA\\Settings\\Personal\\Additional' => __DIR__ . '/..' . '/../lib/Settings/Personal/Additional.php', 'OCA\\Settings\\Personal\\PersonalInfo' => __DIR__ . '/..' . '/../lib/Settings/Personal/PersonalInfo.php', - 'OCA\\Settings\\Personal\\Security' => __DIR__ . '/..' . '/../lib/Settings/Personal/Security.php', 'OCA\\Settings\\Personal\\Security\\Authtokens' => __DIR__ . '/..' . '/../lib/Settings/Personal/Security/Authtokens.php', + 'OCA\\Settings\\Personal\\Security\\Password' => __DIR__ . '/..' . '/../lib/Settings/Personal/Security/Password.php', 'OCA\\Settings\\Personal\\ServerDevNotice' => __DIR__ . '/..' . '/../lib/Settings/Personal/ServerDevNotice.php', 'OCA\\Settings\\Sections\\Admin\\Additional' => __DIR__ . '/..' . '/../lib/Sections/Admin/Additional.php', 'OCA\\Settings\\Sections\\Admin\\Groupware' => __DIR__ . '/..' . '/../lib/Sections/Admin/Groupware.php', diff --git a/apps/settings/lib/Settings/Personal/Security.php b/apps/settings/lib/Settings/Personal/Security/Password.php similarity index 93% rename from apps/settings/lib/Settings/Personal/Security.php rename to apps/settings/lib/Settings/Personal/Security/Password.php index f571be0c22..91d8b9228e 100644 --- a/apps/settings/lib/Settings/Personal/Security.php +++ b/apps/settings/lib/Settings/Personal/Security/Password.php @@ -1,4 +1,5 @@ * @@ -25,13 +26,13 @@ * */ -namespace OCA\Settings\Personal; +namespace OCA\Settings\Personal\Security; use OCP\AppFramework\Http\TemplateResponse; use OCP\IUserManager; use OCP\Settings\ISettings; -class Security implements ISettings { +class Password implements ISettings { /** @var IUserManager */ private $userManager; @@ -52,7 +53,7 @@ class Security implements ISettings { $passwordChangeSupported = $user->canChangePassword(); } - return new TemplateResponse('settings', 'settings/personal/security', [ + return new TemplateResponse('settings', 'settings/personal/security/password', [ 'passwordChangeSupported' => $passwordChangeSupported, ]); } diff --git a/apps/settings/templates/settings/personal/security.php b/apps/settings/templates/settings/personal/security/password.php similarity index 100% rename from apps/settings/templates/settings/personal/security.php rename to apps/settings/templates/settings/personal/security/password.php diff --git a/apps/settings/tests/Settings/Personal/Security/AuthtokensTest.php b/apps/settings/tests/Settings/Personal/Security/AuthtokensTest.php index 6837fc101c..6fd7cf22ef 100644 --- a/apps/settings/tests/Settings/Personal/Security/AuthtokensTest.php +++ b/apps/settings/tests/Settings/Personal/Security/AuthtokensTest.php @@ -29,7 +29,7 @@ namespace OCA\Settings\Tests\Settings\Personal\Security; use OC\Authentication\Token\DefaultToken; use OC\Authentication\Token\IProvider as IAuthTokenProvider; -use OCA\Settings\Personal\Security; +use OCA\Settings\Personal\Password; use OCA\Settings\Personal\Security\Authtokens; use OCP\AppFramework\Http\TemplateResponse; use OCP\IInitialStateService; diff --git a/apps/settings/tests/Settings/Personal/SecurityTest.php b/apps/settings/tests/Settings/Personal/Security/PasswordTest.php similarity index 89% rename from apps/settings/tests/Settings/Personal/SecurityTest.php rename to apps/settings/tests/Settings/Personal/Security/PasswordTest.php index 103bd9dae9..160e4ebf84 100644 --- a/apps/settings/tests/Settings/Personal/SecurityTest.php +++ b/apps/settings/tests/Settings/Personal/Security/PasswordTest.php @@ -1,5 +1,4 @@ userManager = $this->createMock(IUserManager::class); $this->uid = 'test123'; - $this->section = new Security( + $this->section = new Password( $this->userManager, $this->uid ); diff --git a/lib/private/Settings/Manager.php b/lib/private/Settings/Manager.php index 87ef74aaba..157ab9db1d 100644 --- a/lib/private/Settings/Manager.php +++ b/lib/private/Settings/Manager.php @@ -289,7 +289,7 @@ class Manager implements IManager { } if ($section === 'security') { /** @var ISettings $form */ - $form = $this->container->query(\OCA\Settings\Personal\Security::class); + $form = $this->container->query(\OCA\Settings\Personal\Security\Password::class); $forms[$form->getPriority()] = [$form]; /** @var ISettings $form */ diff --git a/tests/lib/Settings/ManagerTest.php b/tests/lib/Settings/ManagerTest.php index 3980990c7b..7972a4bdbb 100644 --- a/tests/lib/Settings/ManagerTest.php +++ b/tests/lib/Settings/ManagerTest.php @@ -26,7 +26,7 @@ namespace OCA\Settings\Tests\AppInfo; use OC\Settings\Manager; use OC\Settings\Section; use OCA\Settings\Admin\Sharing; -use OCA\Settings\Personal\Security; +use OCA\Settings\Personal\Password; use OCP\IDBConnection; use OCP\IL10N; use OCP\ILogger; @@ -149,7 +149,7 @@ class ManagerTest extends TestCase { } public function testGetPersonalSettings() { - $section = $this->createMock(Security::class); + $section = $this->createMock(Password::class); $section->expects($this->once()) ->method('getPriority') ->willReturn(16); @@ -159,7 +159,7 @@ class ManagerTest extends TestCase { ->willReturn(100); $this->container->expects($this->at(0)) ->method('query') - ->with(Security::class) + ->with(Password::class) ->willReturn($section); $this->container->expects($this->at(1)) ->method('query')