aboutsummaryrefslogtreecommitdiffstats
path: root/apps/user_ldap
diff options
context:
space:
mode:
authorJulius Härtl <jus@bitgrid.net>2021-07-01 08:34:55 +0200
committerGitHub <noreply@github.com>2021-07-01 08:34:55 +0200
commit3853307a6a854c7b4f2792fea316439ac76145c3 (patch)
tree8ebcfdd7c10b3c82d544d42506d45e6320259b63 /apps/user_ldap
parentbb40e65e4e01960abc7cd0112bcfd00e661caa96 (diff)
parentb78f3a57d1d05fb5f81ec8361139b64a3e54d7b0 (diff)
downloadnextcloud-server-3853307a6a854c7b4f2792fea316439ac76145c3.tar.gz
nextcloud-server-3853307a6a854c7b4f2792fea316439ac76145c3.zip
Merge pull request #26681 from nextcloud/techdebt/hint-exception-ocp
Move HintException to OCP
Diffstat (limited to 'apps/user_ldap')
-rw-r--r--apps/user_ldap/lib/Access.php2
-rw-r--r--apps/user_ldap/lib/Controller/RenewPasswordController.php4
-rw-r--r--apps/user_ldap/tests/AccessTest.php2
-rw-r--r--apps/user_ldap/tests/User_LDAPTest.php6
4 files changed, 7 insertions, 7 deletions
diff --git a/apps/user_ldap/lib/Access.php b/apps/user_ldap/lib/Access.php
index 47cecd1bf7d..33329c0f03a 100644
--- a/apps/user_ldap/lib/Access.php
+++ b/apps/user_ldap/lib/Access.php
@@ -47,7 +47,6 @@
namespace OCA\User_LDAP;
use DomainException;
-use OC\HintException;
use OC\Hooks\PublicEmitter;
use OC\ServerNotAvailableException;
use OCA\User_LDAP\Exceptions\ConstraintViolationException;
@@ -56,6 +55,7 @@ use OCA\User_LDAP\Mapping\AbstractMapping;
use OCA\User_LDAP\Mapping\UserMapping;
use OCA\User_LDAP\User\Manager;
use OCA\User_LDAP\User\OfflineUser;
+use OCP\HintException;
use OCP\IConfig;
use OCP\ILogger;
use OCP\IUserManager;
diff --git a/apps/user_ldap/lib/Controller/RenewPasswordController.php b/apps/user_ldap/lib/Controller/RenewPasswordController.php
index eb8b19192c3..66371cb3b49 100644
--- a/apps/user_ldap/lib/Controller/RenewPasswordController.php
+++ b/apps/user_ldap/lib/Controller/RenewPasswordController.php
@@ -23,10 +23,10 @@
*/
namespace OCA\User_LDAP\Controller;
-use OC\HintException;
use OCP\AppFramework\Controller;
use OCP\AppFramework\Http\RedirectResponse;
use OCP\AppFramework\Http\TemplateResponse;
+use OCP\HintException;
use OCP\IConfig;
use OCP\IL10N;
use OCP\IRequest;
@@ -139,7 +139,7 @@ class RenewPasswordController extends Controller {
]);
return new RedirectResponse($this->urlGenerator->linkToRoute('user_ldap.renewPassword.showRenewPasswordForm', $args));
}
-
+
try {
if (!is_null($newPassword) && \OC_User::setPassword($user, $newPassword)) {
$this->session->set('loginMessages', [
diff --git a/apps/user_ldap/tests/AccessTest.php b/apps/user_ldap/tests/AccessTest.php
index ae07ea509ef..e49faca70cc 100644
--- a/apps/user_ldap/tests/AccessTest.php
+++ b/apps/user_ldap/tests/AccessTest.php
@@ -482,7 +482,7 @@ class AccessTest extends TestCase {
public function testSetPasswordWithRejectedChange() {
- $this->expectException(\OC\HintException::class);
+ $this->expectException(\OCP\HintException::class);
$this->expectExceptionMessage('Password change rejected.');
$this->connection
diff --git a/apps/user_ldap/tests/User_LDAPTest.php b/apps/user_ldap/tests/User_LDAPTest.php
index 78767ff6760..3142a256c9a 100644
--- a/apps/user_ldap/tests/User_LDAPTest.php
+++ b/apps/user_ldap/tests/User_LDAPTest.php
@@ -31,7 +31,6 @@
*/
namespace OCA\User_LDAP\Tests;
-use OC\HintException;
use OC\User\Backend;
use OC\User\Session;
use OCA\User_LDAP\Access;
@@ -44,6 +43,7 @@ use OCA\User_LDAP\User\User;
use OCA\User_LDAP\User_LDAP;
use OCA\User_LDAP\User_LDAP as UserLDAP;
use OCA\User_LDAP\UserPluginManager;
+use OCP\HintException;
use OCP\IConfig;
use OCP\IUser;
use OCP\Notification\IManager as INotificationManager;
@@ -1214,7 +1214,7 @@ class User_LDAPTest extends TestCase {
public function testSetPasswordInvalid() {
- $this->expectException(\OC\HintException::class);
+ $this->expectException(\OCP\HintException::class);
$this->expectExceptionMessage('Password fails quality checking policy');
$this->prepareAccessForSetPassword($this->access);
@@ -1359,7 +1359,7 @@ class User_LDAPTest extends TestCase {
public function testSetDisplayNameErrorWithPlugin() {
- $this->expectException(\OC\HintException::class);
+ $this->expectException(\OCP\HintException::class);
$newDisplayName = 'J. Baker';
$this->pluginManager->expects($this->once())