diff options
author | Samuel <faust64@gmail.com> | 2021-02-05 12:06:35 +0100 |
---|---|---|
committer | Samuel <faust64@gmail.com> | 2021-02-05 12:06:35 +0100 |
commit | 59e43b48282894f74fe8cd381ccdf0b1bb8cc536 (patch) | |
tree | 8f5a15d1093447427056bd4476740929228672ce /lib/private/Share20 | |
parent | df9ce19a6b0db6bbe74c12b184ac798787344cfa (diff) | |
download | nextcloud-server-59e43b48282894f74fe8cd381ccdf0b1bb8cc536.tar.gz nextcloud-server-59e43b48282894f74fe8cd381ccdf0b1bb8cc536.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')
-rw-r--r-- | lib/private/Share20/Manager.php | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/private/Share20/Manager.php b/lib/private/Share20/Manager.php index 9a2b413896b..cbe79ddaeb9 100644 --- a/lib/private/Share20/Manager.php +++ b/lib/private/Share20/Manager.php @@ -529,7 +529,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 @@ -542,7 +542,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); } } |