mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-17 07:41:26 +00:00
[share link] Remove deactivate
This commit is contained in:
@@ -279,6 +279,9 @@ SHARE_LINK_PASSWORD_MIN_LENGTH = 8
|
||||
# enable or disable share link audit
|
||||
ENABLE_SHARE_LINK_AUDIT = False
|
||||
|
||||
# Control the language that send email. Default to user's current language.
|
||||
SHARE_LINK_EMAIL_LANGUAGE = ''
|
||||
|
||||
# check virus for files uploaded form upload link
|
||||
ENABLE_UPLOAD_LINK_VIRUS_CHECK = False
|
||||
|
||||
@@ -394,9 +397,6 @@ ACTIVATE_AFTER_REGISTRATION = True
|
||||
# This option will be ignored if ``ACTIVATE_AFTER_REGISTRATION`` set to ``True``.
|
||||
REGISTRATION_SEND_MAIL = False
|
||||
|
||||
#Control the language that send email.
|
||||
SHARE_LINK_EMAIL_LANGUAGE = ''
|
||||
|
||||
REQUIRE_DETAIL_ON_REGISTRATION = False
|
||||
|
||||
# Account initial password, for password resetting.
|
||||
|
@@ -9,7 +9,7 @@ from constance import config
|
||||
from django.core.cache import cache
|
||||
from django.http import HttpResponse, HttpResponseRedirect, Http404, \
|
||||
HttpResponseBadRequest
|
||||
from django.utils.translation import ugettext as _, activate, deactivate
|
||||
from django.utils.translation import ugettext as _, activate
|
||||
from django.contrib import messages
|
||||
from django.utils import timezone
|
||||
from django.utils.html import escape
|
||||
@@ -152,6 +152,7 @@ def send_shared_link(request):
|
||||
|
||||
if SHARE_LINK_EMAIL_LANGUAGE:
|
||||
activate(SHARE_LINK_EMAIL_LANGUAGE)
|
||||
|
||||
# Add email to contacts.
|
||||
mail_sended.send(sender=None, user=request.user.username,
|
||||
email=to_email)
|
||||
@@ -195,7 +196,6 @@ def send_shared_link(request):
|
||||
except Exception:
|
||||
send_failed.append(to_email)
|
||||
|
||||
deactivate()
|
||||
if len(send_success) > 0:
|
||||
data = json.dumps({"send_success": send_success, "send_failed": send_failed})
|
||||
return HttpResponse(data, status=200, content_type=content_type)
|
||||
|
Reference in New Issue
Block a user