Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
[stable10] Add passwordEnabled field to postHookData
Add passwordEnabled field to postHookData

Signed-off-by: Sujith H <[email protected]>
  • Loading branch information
sharidas committed Aug 29, 2017
commit 547e12135df3019435f6b54709cb532c1c200041
1 change: 1 addition & 0 deletions lib/private/Share20/Manager.php
Original file line number Diff line number Diff line change
Expand Up @@ -644,6 +644,7 @@ public function createShare(\OCP\Share\IShare $share) {
'shareWith' => $share->getSharedWith(),
'itemTarget' => $share->getTarget(),
'fileTarget' => $share->getTarget(),
'passwordEnabled' => (!is_null($share->getPassword()) and ($share->getPassword() !== '')),
];

\OC_Hook::emit('OCP\Share', 'post_shared', $postHookData);
Expand Down
1 change: 1 addition & 0 deletions tests/lib/Share20/ManagerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -1785,6 +1785,7 @@ public function testCreateShareLink() {
'itemTarget' => '/target',
'fileTarget' => '/target',
'shareWith' => null,
'passwordEnabled' => true,
];

$hookListner->expects($this->once())
Expand Down