diff options
author | tobiasKaminsky <tobias@kaminsky.me> | 2021-10-20 06:18:03 +0200 |
---|---|---|
committer | backportbot[bot] <backportbot[bot]@users.noreply.github.com> | 2021-11-03 12:24:24 +0000 |
commit | 0d1f92ccf075c7866246fbe6e1f86a3e4d29ae10 (patch) | |
tree | 4a1bbeb8fc437fd4bfacbc4b6457f6bda291be67 | |
parent | 7d3a01e675670418b86c846d5c7ae81664aff23b (diff) | |
download | nextcloud-server-0d1f92ccf075c7866246fbe6e1f86a3e4d29ae10.tar.gz nextcloud-server-0d1f92ccf075c7866246fbe6e1f86a3e4d29ae10.zip |
Expose send_password_by_mail via capabilities
Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>
-rw-r--r-- | apps/sharebymail/lib/Capabilities.php | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/apps/sharebymail/lib/Capabilities.php b/apps/sharebymail/lib/Capabilities.php index eda8df9db5e..39d7172bb76 100644 --- a/apps/sharebymail/lib/Capabilities.php +++ b/apps/sharebymail/lib/Capabilities.php @@ -27,6 +27,7 @@ declare(strict_types=1); */ namespace OCA\ShareByMail; +use OCA\ShareByMail\Settings\SettingsManager; use OCP\Capabilities\ICapability; use OCP\Share\IManager; @@ -35,8 +36,13 @@ class Capabilities implements ICapability { /** @var IManager */ private $manager; - public function __construct(IManager $manager) { + /** @var SettingsManager */ + private $settingsManager; + + public function __construct(IManager $manager, + SettingsManager $settingsManager) { $this->manager = $manager; + $this->settingsManager = $settingsManager; } public function getCapabilities(): array { @@ -46,6 +52,7 @@ class Capabilities implements ICapability { 'sharebymail' => [ 'enabled' => $this->manager->shareApiAllowLinks(), + 'send_password_by_mail' => $this->settingsManager->sendPasswordByMail(), 'upload_files_drop' => [ 'enabled' => true, ], |