Skip to content

Commit

Permalink
fix(translation): replace static error message
Browse files Browse the repository at this point in the history
as suggested by @kesselb in #25490

Signed-off-by: Samuel <faust64@gmail.com>
  • Loading branch information
faust64 authored and backportbot[bot] committed Mar 30, 2021
1 parent 99e2e5f commit 2703777
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/private/Share20/Manager.php
Original file line number Diff line number Diff line change
Expand Up @@ -529,7 +529,7 @@ protected function validateExpirationDateLink(IShare $share) {
* 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
Expand All @@ -542,7 +542,8 @@ protected function userCreateChecks(IShare $share) {
$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);
}
}

Expand Down

0 comments on commit 2703777

Please sign in to comment.