Skip to content

Commit 3200abd

Browse files
author
Vincent Petry
authored
Merge pull request #28827 from owncloud/update-password-postshare-hook-stable10
[stable10] Add passwordEnabled field to postHookData
2 parents 48ebc75 + 547e121 commit 3200abd

2 files changed

Lines changed: 2 additions & 0 deletions

File tree

lib/private/Share20/Manager.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -644,6 +644,7 @@ public function createShare(\OCP\Share\IShare $share) {
644644
'shareWith' => $share->getSharedWith(),
645645
'itemTarget' => $share->getTarget(),
646646
'fileTarget' => $share->getTarget(),
647+
'passwordEnabled' => (!is_null($share->getPassword()) and ($share->getPassword() !== '')),
647648
];
648649

649650
\OC_Hook::emit('OCP\Share', 'post_shared', $postHookData);

tests/lib/Share20/ManagerTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1785,6 +1785,7 @@ public function testCreateShareLink() {
17851785
'itemTarget' => '/target',
17861786
'fileTarget' => '/target',
17871787
'shareWith' => null,
1788+
'passwordEnabled' => true,
17881789
];
17891790

17901791
$hookListner->expects($this->once())

0 commit comments

Comments
 (0)