mirror of
https://github.com/nextcloud/server.git
synced 2026-02-20 00:12:30 -05:00
add post hook on link-share password change
This commit is contained in:
parent
850ac0cf84
commit
4dfd56ee81
1 changed files with 9 additions and 1 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue