summaryrefslogtreecommitdiffstats
path: root/lib/private/Share20/Manager.php
diff options
context:
space:
mode:
authorSamuel <faust64@gmail.com>2021-02-05 12:06:35 +0100
committerbackportbot[bot] <backportbot[bot]@users.noreply.github.com>2021-03-30 19:26:04 +0000
commit22ddcfa740c8e0ab2a6f43723d59280f1813a56d (patch)
treed2cf92bac5c0610c1f56301362d24304b9dcd182 /lib/private/Share20/Manager.php
parentb2072cd6fca3302cd621ef849b8e5e59b42665a8 (diff)
downloadnextcloud-server-22ddcfa740c8e0ab2a6f43723d59280f1813a56d.tar.gz
nextcloud-server-22ddcfa740c8e0ab2a6f43723d59280f1813a56d.zip
fix(translation): replace static error message
as suggested by @kesselb in nextcloud/server#25490 Signed-off-by: Samuel <faust64@gmail.com>
Diffstat (limited to 'lib/private/Share20/Manager.php')
-rw-r--r--lib/private/Share20/Manager.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/private/Share20/Manager.php b/lib/private/Share20/Manager.php
index f58bf882554..b021cedbcb0 100644
--- a/lib/private/Share20/Manager.php
+++ b/lib/private/Share20/Manager.php
@@ -530,7 +530,7 @@ class Manager implements IManager {
* Check for pre share requirements for user shares
*
* @param IShare $share
- * @throws \Exception
+ * @throws GenericShareException
*/
protected function userCreateChecks(IShare $share) {
// Check if we can share with group members only
@@ -543,7 +543,8 @@ class Manager implements IManager {
$this->groupManager->getUserGroupIds($sharedWith)
);
if (empty($groups)) {
- throw new \Exception('Sharing is only allowed with group members');
+ $message_t = $this->l->t('Sharing is only allowed with group members');
+ throw new GenericShareException($message_t, $message_t, 404);
}
}