mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-26 07:22:34 +00:00
Merge branch '7.1' into 8.0
This commit is contained in:
@@ -148,8 +148,7 @@ class InvitationsBatchView(APIView):
|
|||||||
if not send_success:
|
if not send_success:
|
||||||
result['failed'].append({
|
result['failed'].append({
|
||||||
'email': accepter,
|
'email': accepter,
|
||||||
'error_msg': _('Failed to send email, email service is not properly configured, \
|
'error_msg': _('Failed to send email, email service is not properly configured, please contact administrator.'),
|
||||||
please contact administrator.'),
|
|
||||||
})
|
})
|
||||||
else:
|
else:
|
||||||
result['success'].append(i.to_dict())
|
result['success'].append(i.to_dict())
|
||||||
|
@@ -207,8 +207,7 @@ class RepoShareInvitationsBatchView(APIView):
|
|||||||
if not send_sucess:
|
if not send_sucess:
|
||||||
result['failed'].append({
|
result['failed'].append({
|
||||||
'email': accepter,
|
'email': accepter,
|
||||||
'error_msg': _('Failed to send email, email service is not properly configured, \
|
'error_msg': _('Failed to send email, email service is not properly configured, please contact administrator.'),
|
||||||
please contact administrator.'),
|
|
||||||
})
|
})
|
||||||
|
|
||||||
return Response(result)
|
return Response(result)
|
||||||
|
@@ -30,7 +30,7 @@ class SendShareLinkView(APIView):
|
|||||||
def post(self, request):
|
def post(self, request):
|
||||||
|
|
||||||
if not IS_EMAIL_CONFIGURED:
|
if not IS_EMAIL_CONFIGURED:
|
||||||
error_msg = _('Sending shared link failed. Email service is not properly configured, please contact administrator.')
|
error_msg = _('Failed to send email, email service is not properly configured, please contact administrator.')
|
||||||
return api_error(status.HTTP_403_FORBIDDEN, error_msg)
|
return api_error(status.HTTP_403_FORBIDDEN, error_msg)
|
||||||
|
|
||||||
# check args
|
# check args
|
||||||
|
@@ -29,7 +29,7 @@ class SendUploadLinkView(APIView):
|
|||||||
def post(self, request):
|
def post(self, request):
|
||||||
|
|
||||||
if not IS_EMAIL_CONFIGURED:
|
if not IS_EMAIL_CONFIGURED:
|
||||||
error_msg = _('Sending shared link failed. Email service is not properly configured, please contact administrator.')
|
error_msg = _('Failed to send email, email service is not properly configured, please contact administrator.')
|
||||||
return api_error(status.HTTP_403_FORBIDDEN, error_msg)
|
return api_error(status.HTTP_403_FORBIDDEN, error_msg)
|
||||||
|
|
||||||
# check args
|
# check args
|
||||||
|
@@ -133,8 +133,7 @@ def send_shared_link(request):
|
|||||||
content_type = 'application/json; charset=utf-8'
|
content_type = 'application/json; charset=utf-8'
|
||||||
|
|
||||||
if not IS_EMAIL_CONFIGURED:
|
if not IS_EMAIL_CONFIGURED:
|
||||||
data = json.dumps({'error': _('Sending shared link failed. \
|
data = json.dumps({'error': _('Failed to send email, email service is not properly configured, please contact administrator.')})
|
||||||
Email service is not properly configured, please contact administrator.')})
|
|
||||||
return HttpResponse(data, status=500, content_type=content_type)
|
return HttpResponse(data, status=500, content_type=content_type)
|
||||||
|
|
||||||
form = FileLinkShareForm(request.POST)
|
form = FileLinkShareForm(request.POST)
|
||||||
@@ -262,8 +261,7 @@ def send_shared_upload_link(request):
|
|||||||
content_type = 'application/json; charset=utf-8'
|
content_type = 'application/json; charset=utf-8'
|
||||||
|
|
||||||
if not IS_EMAIL_CONFIGURED:
|
if not IS_EMAIL_CONFIGURED:
|
||||||
data = json.dumps({'error': _('Sending shared upload link failed. \
|
data = json.dumps({'error': _('Failed to send email, email service is not properly configured, please contact administrator.')})
|
||||||
Email service is not properly configured, please contact administrator.')})
|
|
||||||
return HttpResponse(data, status=500, content_type=content_type)
|
return HttpResponse(data, status=500, content_type=content_type)
|
||||||
|
|
||||||
form = UploadLinkShareForm(request.POST)
|
form = UploadLinkShareForm(request.POST)
|
||||||
|
Reference in New Issue
Block a user