diff options
author | Joas Schilling <coding@schilljs.com> | 2020-02-18 11:02:11 +0100 |
---|---|---|
committer | backportbot[bot] <backportbot[bot]@users.noreply.github.com> | 2020-02-22 20:26:27 +0000 |
commit | 8d5c51730b65e2e91529faf809561774cc41cf11 (patch) | |
tree | eae3c023054f6e85fd04b754d5e4dc31f23278fe /lib | |
parent | c383452b227b6c6b140eb8cab81d10a52cb36987 (diff) | |
download | nextcloud-server-8d5c51730b65e2e91529faf809561774cc41cf11.tar.gz nextcloud-server-8d5c51730b65e2e91529faf809561774cc41cf11.zip |
Strip of users home path from share api message
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/Share20/Manager.php | 6 |
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); } |