aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files_sharing/lib
diff options
context:
space:
mode:
authorCyrille Bollu <cyrpub@bollu.be>2022-04-14 21:08:53 +0200
committernextcloud-command <nextcloud-command@users.noreply.github.com>2022-06-08 13:22:10 +0000
commite35cbd2a6b5abc976ce2cce0b60d0aa6d968a252 (patch)
tree765d6bb81522bcbc738e9308f859b2d0b89cd7b1 /apps/files_sharing/lib
parent1cf2ed484eeb101566ca1bc570b2b52a2936d7b5 (diff)
downloadnextcloud-server-e35cbd2a6b5abc976ce2cce0b60d0aa6d968a252.tar.gz
nextcloud-server-e35cbd2a6b5abc976ce2cce0b60d0aa6d968a252.zip
Various improvements related to the recent implementation of temporary passwords
for mail shares: 1- Changes style of "forgot password?" and "Back" button 2- Adds information about share password's expiration time in the emails sent. 3- Shows password expiration time in the Share menu 4- Fixes an issue when the message "Password expires..." would be shown for non email share types (which don't have temporary passswords) 5- At share's creation, password should only be sent when it's a permanent one See also https://github.com/nextcloud/server/issues/31952 Signed-off-by: Cyrille Bollu <cyrpub@bollu.be> Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
Diffstat (limited to 'apps/files_sharing/lib')
-rw-r--r--apps/files_sharing/lib/Controller/ShareAPIController.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/apps/files_sharing/lib/Controller/ShareAPIController.php b/apps/files_sharing/lib/Controller/ShareAPIController.php
index c0441485132..f531954d5da 100644
--- a/apps/files_sharing/lib/Controller/ShareAPIController.php
+++ b/apps/files_sharing/lib/Controller/ShareAPIController.php
@@ -279,7 +279,7 @@ class ShareAPIController extends OCSController {
} elseif ($share->getShareType() === IShare::TYPE_EMAIL) {
$result['share_with'] = $share->getSharedWith();
$result['password'] = $share->getPassword();
- $result['password_expiration_time'] = $share->getPasswordExpirationTime();
+ $result['password_expiration_time'] = $share->getPasswordExpirationTime() !== null ? $share->getPasswordExpirationTime()->format(\DateTime::ATOM) : null;
$result['send_password_by_talk'] = $share->getSendPasswordByTalk();
$result['share_with_displayname'] = $this->getDisplayNameFromAddressBook($share->getSharedWith(), 'EMAIL');
$result['token'] = $share->getToken();