Skip to content

Commit

Permalink
fix(Login): do not advertise CHECK_PASSWORD capability
Browse files Browse the repository at this point in the history
Addendum to e8a60d5, it should have been
removed with that commit already.

Signed-off-by: Arthur Schiwon <[email protected]>
  • Loading branch information
blizzz committed Apr 2, 2024
1 parent 5c6d982 commit 05e5f2f
Showing 1 changed file with 4 additions and 18 deletions.
22 changes: 4 additions & 18 deletions lib/UserBackend.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,16 @@
use OCP\IUserManager;
use OCP\IUserSession;
use OCP\Server;
use OCP\User\Backend\ABackend;
use OCP\User\Backend\ICountUsersBackend;
use OCP\User\Backend\IGetDisplayNameBackend;
use OCP\User\Backend\IGetHomeBackend;
use OCP\User\Events\UserChangedEvent;
use OCP\User\Events\UserFirstTimeLoggedInEvent;
use OCP\UserInterface;
use Psr\Log\LoggerInterface;

class UserBackend implements IApacheBackend, UserInterface, IUserBackend, IGetDisplayNameBackend {
class UserBackend extends ABackend implements IApacheBackend, IUserBackend, IGetDisplayNameBackend, ICountUsersBackend, IGetHomeBackend {
/** @var IConfig */
private $config;
/** @var IURLGenerator */
Expand Down Expand Up @@ -170,23 +173,6 @@ public function initializeHomeDir(string $uid): void {
$this->eventDispatcher->dispatchTyped(new UserFirstTimeLoggedInEvent($user));
}

/**
* Check if backend implements actions
* @param int $actions bitwise-or'ed actions
* @return boolean
*
* Returns the supported actions as int to be
* compared with \OC\User\Backend::CREATE_USER etc.
* @since 4.5.0
*/
public function implementsActions($actions) {
$availableActions = \OC\User\Backend::CHECK_PASSWORD;
$availableActions |= \OC\User\Backend::GET_DISPLAYNAME;
$availableActions |= \OC\User\Backend::GET_HOME;
$availableActions |= \OC\User\Backend::COUNT_USERS;
return (bool)($availableActions & $actions);
}

/**
* delete a user
* @param string $uid The username of the user to delete
Expand Down

0 comments on commit 05e5f2f

Please sign in to comment.