aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/Share20/Manager.php
diff options
context:
space:
mode:
authorRoeland Jago Douma <rullzer@users.noreply.github.com>2021-03-19 13:39:22 +0100
committerGitHub <noreply@github.com>2021-03-19 13:39:22 +0100
commit12868487312fa2d153fdebc7592ab54dcaf2c419 (patch)
tree2721edc1d8f5b2beed882b818cb5ecfff4069bf7 /lib/private/Share20/Manager.php
parent086cf56b21e6b3506cc628acc94ef3ccbb2c9de0 (diff)
parenta55064970835b790ed6c9dfe865e655b9d76694b (diff)
downloadnextcloud-server-12868487312fa2d153fdebc7592ab54dcaf2c419.tar.gz
nextcloud-server-12868487312fa2d153fdebc7592ab54dcaf2c419.zip
Merge pull request #23718 from nextcloud/already-shared-error-message
expand 'path is already shared' error message
Diffstat (limited to 'lib/private/Share20/Manager.php')
-rw-r--r--lib/private/Share20/Manager.php8
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/private/Share20/Manager.php b/lib/private/Share20/Manager.php
index 1c875ad0c0a..64767baa5cc 100644
--- a/lib/private/Share20/Manager.php
+++ b/lib/private/Share20/Manager.php
@@ -565,9 +565,10 @@ class Manager implements IManager {
//Shares are not identical
}
- // Identical share already existst
+ // Identical share already exists
if ($existingShare->getSharedWith() === $share->getSharedWith() && $existingShare->getShareType() === $share->getShareType()) {
- throw new AlreadySharedException('Path is already shared with this user', $existingShare);
+ $message = $this->l->t('Sharing %s failed, because this item is already shared with user %s', [$share->getNode()->getName(), $share->getSharedWithDisplayName()]);
+ throw new AlreadySharedException($message, $existingShare);
}
// The share is already shared with this user via a group share
@@ -577,7 +578,8 @@ class Manager implements IManager {
$user = $this->userManager->get($share->getSharedWith());
if ($group->inGroup($user) && $existingShare->getShareOwner() !== $share->getShareOwner()) {
- throw new AlreadySharedException('Path is already shared with this user', $existingShare);
+ $message = $this->l->t('Sharing %s failed, because this item is already shared with user %s', [$share->getNode()->getName(), $share->getSharedWithDisplayName()]);
+ throw new AlreadySharedException($message, $existingShare);
}
}
}