user_sql-78 Hide "password change form"

Hide "password change form" when "Allow password change" not set
This commit is contained in:
Marcin Łojewski
2018-12-15 20:09:04 +01:00
parent 4be9acb32c
commit c6c345873c

View File

@@ -21,6 +21,7 @@
namespace OCA\UserSQL\Backend;
use OC\User\Backend;
use OCA\UserSQL\Action\EmailSync;
use OCA\UserSQL\Action\IUserAction;
use OCA\UserSQL\Action\QuotaSync;
@@ -642,4 +643,16 @@ final class UserBackend extends ABackend implements
{
return false;
}
/**
* @inheritdoc
*/
public function implementsActions($actions): bool
{
if ($actions & Backend::SET_PASSWORD) {
return !empty($this->properties[Opt::PASSWORD_CHANGE]);
}
return parent::implementsActions($actions);
}
}