Skip to content

Commit

Permalink
Merge pull request #28827 from owncloud/update-password-postshare-hoo…
Browse files Browse the repository at this point in the history
…k-stable10

[stable10] Add passwordEnabled field to postHookData
  • Loading branch information
Vincent Petry authored Aug 29, 2017
2 parents 48ebc75 + 547e121 commit 3200abd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
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

0 comments on commit 3200abd

Please sign in to comment.