aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortobiasKaminsky <tobias@kaminsky.me>2021-10-20 06:18:03 +0200
committertobiasKaminsky <tobias@kaminsky.me>2021-10-20 06:18:03 +0200
commit05c08b7ca25a8ee173d133e29f58845a5a3598d6 (patch)
tree570952556da2d9c453111e1a9fbfa17fdd45cfb6
parent1d1010de2f7c32565f9c0208ffe7f2235db53769 (diff)
downloadnextcloud-server-05c08b7ca25a8ee173d133e29f58845a5a3598d6.tar.gz
nextcloud-server-05c08b7ca25a8ee173d133e29f58845a5a3598d6.zip
Expose send_password_by_mail via capabilities
Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>
-rw-r--r--apps/sharebymail/lib/Capabilities.php9
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,
],