summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorRoeland Jago Douma <rullzer@users.noreply.github.com>2020-02-22 21:25:24 +0100
committerGitHub <noreply@github.com>2020-02-22 21:25:24 +0100
commitab7f6dd3f56f0baa2e814a12728d472dad6cb5f0 (patch)
tree70e8d9ec5a1f18bd6a86992fa256efe60f514c72 /lib
parent0e7fbe64d7c2baada7c49e8fbaa7f1bc145c346f (diff)
parente97d643969ca04dada2877d67efd1f0ebd019916 (diff)
downloadnextcloud-server-ab7f6dd3f56f0baa2e814a12728d472dad6cb5f0.tar.gz
nextcloud-server-ab7f6dd3f56f0baa2e814a12728d472dad6cb5f0.zip
Merge pull request #19528 from nextcloud/bugfix/noid/remove-user-root-from-error-message
Strip of users home path from share api message
Diffstat (limited to 'lib')
-rw-r--r--lib/private/Share20/Manager.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/private/Share20/Manager.php b/lib/private/Share20/Manager.php
index 8ec025ebc26..ca668e24e7f 100644
--- a/lib/private/Share20/Manager.php
+++ b/lib/private/Share20/Manager.php
@@ -289,7 +289,8 @@ class Manager implements IManager {
// Check if we actually have share permissions
if (!$share->getNode()->isShareable()) {
- $message_t = $this->l->t('You are not allowed to share %s', [$share->getNode()->getPath()]);
+ $path = $userFolder->getRelativePath($share->getNode()->getPath());
+ $message_t = $this->l->t('You are not allowed to share %s', [$path]);
throw new GenericShareException($message_t, $message_t, 404);
}
@@ -333,7 +334,8 @@ class Manager implements IManager {
// Check that we do not share with more permissions than we have
if ($share->getPermissions() & ~$permissions) {
- $message_t = $this->l->t('Can’t increase permissions of %s', [$share->getNode()->getPath()]);
+ $path = $userFolder->getRelativePath($share->getNode()->getPath());
+ $message_t = $this->l->t('Can’t increase permissions of %s', [$path]);
throw new GenericShareException($message_t, $message_t, 404);
}