mirror of
https://github.com/nextcloud/server.git
synced 2026-05-22 01:55:56 -04:00
fix: skip owner when updating for added or removed share
Signed-off-by: Robin Appelman <robin@icewind.nl>
This commit is contained in:
parent
f42bfebcc0
commit
f3830d071c
1 changed files with 8 additions and 0 deletions
|
|
@ -86,6 +86,10 @@ class SharesUpdatedListener implements IEventListener {
|
|||
$share = $event->getShare();
|
||||
$shareTarget = $share->getTarget();
|
||||
foreach ($this->shareManager->getUsersForShare($share) as $user) {
|
||||
if ($share->getShareOwner() === $user->getUID() || $share->getSharedBy() === $user->getUID()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if ($share->getSharedBy() !== $user->getUID()) {
|
||||
$this->markOrRun($user, function () use ($user, $share) {
|
||||
$this->shareUpdater->updateForAddedShare($user, $share);
|
||||
|
|
@ -109,6 +113,10 @@ class SharesUpdatedListener implements IEventListener {
|
|||
if ($event instanceof BeforeShareDeletedEvent) {
|
||||
$share = $event->getShare();
|
||||
foreach ($this->shareManager->getUsersForShare($share) as $user) {
|
||||
if ($share->getShareOwner() === $user->getUID() || $share->getSharedBy() === $user->getUID()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$this->markOrRun($user, function () use ($user, $share) {
|
||||
$this->shareUpdater->updateForDeletedShare($user, $share);
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in a new issue