diff options
author | Arthur Schiwon <blizzz@owncloud.com> | 2016-02-08 23:21:22 +0100 |
---|---|---|
committer | Arthur Schiwon <blizzz@owncloud.com> | 2016-02-08 23:27:37 +0100 |
commit | 4dfd56ee812871955feb9d232ff467991090ed18 (patch) | |
tree | e6deb427baca595743768b06ad7c6b128558b501 /lib/private/share20 | |
parent | 850ac0cf84f2492b16204b811f58a0dc7dc43b6e (diff) | |
download | nextcloud-server-4dfd56ee812871955feb9d232ff467991090ed18.tar.gz nextcloud-server-4dfd56ee812871955feb9d232ff467991090ed18.zip |
add post hook on link-share password change
Diffstat (limited to 'lib/private/share20')
-rw-r--r-- | lib/private/share20/manager.php | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/private/share20/manager.php b/lib/private/share20/manager.php index 7cd44a7cb37..76b28a5087f 100644 --- a/lib/private/share20/manager.php +++ b/lib/private/share20/manager.php @@ -595,9 +595,17 @@ class Manager implements IManager { if ($share->getPassword() !== null) { $share->setPassword($this->hasher->hash($share->getPassword())); } + + \OC_Hook::emit('OCP\Share', 'post_update_password', [ + 'itemType' => $share->getNode() instanceof \OCP\Files\File ? 'file' : 'folder', + 'itemSource' => $share->getNode()->getId(), + 'uidOwner' => $share->getSharedBy(), + 'token' => $share->getToken(), + 'disabled' => is_null($share->getPassword()), + ]); } - if ($share->getExpirationDate() !== $originalShare->getExpirationDate()) { + if ($share->getExpirationDate() != $originalShare->getExpirationDate()) { //Verify the expiration date $this->validateExpirationDate($share); $expirationDateUpdated = true; |