Move password update hook after update
This commit is contained in:
parent
623a0e4637
commit
12afd7b005
|
@ -595,14 +595,6 @@ class Manager implements IManager {
|
||||||
if ($share->getPassword() !== null) {
|
if ($share->getPassword() !== null) {
|
||||||
$share->setPassword($this->hasher->hash($share->getPassword()));
|
$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()) {
|
||||||
|
@ -627,6 +619,16 @@ class Manager implements IManager {
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($share->getPassword() !== $originalShare->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->getPermissions() !== $originalShare->getPermissions()) {
|
if ($share->getPermissions() !== $originalShare->getPermissions()) {
|
||||||
$userFolder = $this->rootFolder->getUserFolder($share->getShareOwner());
|
$userFolder = $this->rootFolder->getUserFolder($share->getShareOwner());
|
||||||
\OC_Hook::emit('OCP\Share', 'post_update_permissions', array(
|
\OC_Hook::emit('OCP\Share', 'post_update_permissions', array(
|
||||||
|
|
Loading…
Reference in New Issue