Merge branch 'master' into feature/document_importer
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
This commit is contained in:
@@ -4,6 +4,15 @@
|
|||||||
test mixin.
|
test mixin.
|
||||||
* Add a reusable task to upload documents.
|
* Add a reusable task to upload documents.
|
||||||
* Add MVP of the importer app.
|
* Add MVP of the importer app.
|
||||||
|
* Fix mailing profile log columns mappings.
|
||||||
|
GitLab issue #626. Thanks to Jesaja Everling (@jeverling)
|
||||||
|
for the report.
|
||||||
|
* Fix the Django SMTP backend username field name.
|
||||||
|
GitLab issue #625. Thanks to Jesaja Everling (@jeverling)
|
||||||
|
for the report and the research.
|
||||||
|
* Increase the Django STMP username.
|
||||||
|
GitLab issue #625. Thanks to Jesaja Everling (@jeverling)
|
||||||
|
for the report and the research.
|
||||||
|
|
||||||
3.2.2 (2019-06-19)
|
3.2.2 (2019-06-19)
|
||||||
==================
|
==================
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
3.2.2
|
3.2.3
|
||||||
|
|||||||
@@ -9,7 +9,15 @@ Changes
|
|||||||
|
|
||||||
- Add support for disabling the random primary key
|
- Add support for disabling the random primary key
|
||||||
test mixin.
|
test mixin.
|
||||||
|
- Fix mailing profile log columns mappings.
|
||||||
|
GitLab issue #626. Thanks to Jesaja Everling (@jeverling)
|
||||||
|
for the report.
|
||||||
|
- Fix the Django SMTP backend username field name.
|
||||||
|
GitLab issue #625. Thanks to Jesaja Everling (@jeverling)
|
||||||
|
for the report and the research.
|
||||||
|
- Increase the Django STMP username.
|
||||||
|
GitLab issue #625. Thanks to Jesaja Everling (@jeverling)
|
||||||
|
for the report and the research.
|
||||||
|
|
||||||
Removals
|
Removals
|
||||||
--------
|
--------
|
||||||
@@ -98,6 +106,8 @@ Backward incompatible changes
|
|||||||
Bugs fixed or issues closed
|
Bugs fixed or issues closed
|
||||||
---------------------------
|
---------------------------
|
||||||
|
|
||||||
- :gitlab-issue:`615`
|
- :gitlab-issue:`619` poplib.POP3_SSL and poplib.POP3 initialized with wrong kwarg
|
||||||
|
- :gitlab-issue:`625` mayan.apps.mailer.mailers.DjangoSMTP uses "user", but django.core.mail.backends.smtp.EmailBackend expects "username"
|
||||||
|
- :gitlab-issue:`626` Mailing profile error log is empty, despite errors
|
||||||
|
|
||||||
.. _PyPI: https://pypi.python.org/pypi/mayan-edms/
|
.. _PyPI: https://pypi.python.org/pypi/mayan-edms/
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
__title__ = 'Mayan EDMS'
|
__title__ = 'Mayan EDMS'
|
||||||
__version__ = '3.2.2'
|
__version__ = '3.2.3'
|
||||||
__build__ = 0x030202
|
__build__ = 0x030203
|
||||||
__build_string__ = 'v3.2.2_Wed Jun 19 00:39:13 2019 -0400'
|
__build_string__ = 'v3.2.3_Fri Jun 21 00:01:37 2019 -0400'
|
||||||
__django_version__ = '1.11'
|
__django_version__ = '1.11'
|
||||||
__author__ = 'Roberto Rosario'
|
__author__ = 'Roberto Rosario'
|
||||||
__author_email__ = 'roberto.rosario@mayan-edms.com'
|
__author_email__ = 'roberto.rosario@mayan-edms.com'
|
||||||
|
|||||||
@@ -51,6 +51,7 @@ class MailerApp(MayanAppConfig):
|
|||||||
|
|
||||||
LogEntry = self.get_model(model_name='LogEntry')
|
LogEntry = self.get_model(model_name='LogEntry')
|
||||||
UserMailer = self.get_model(model_name='UserMailer')
|
UserMailer = self.get_model(model_name='UserMailer')
|
||||||
|
UserMailerLogEntry = self.get_model(model_name='UserMailerLogEntry')
|
||||||
|
|
||||||
MailerBackend.initialize()
|
MailerBackend.initialize()
|
||||||
|
|
||||||
@@ -79,6 +80,13 @@ class MailerApp(MayanAppConfig):
|
|||||||
SourceColumn(
|
SourceColumn(
|
||||||
source=UserMailer, attribute='backend_label'
|
source=UserMailer, attribute='backend_label'
|
||||||
)
|
)
|
||||||
|
SourceColumn(
|
||||||
|
attribute='datetime', label=_('Date and time'),
|
||||||
|
source=UserMailerLogEntry
|
||||||
|
)
|
||||||
|
SourceColumn(
|
||||||
|
attribute='message', label=_('Message'), source=UserMailerLogEntry
|
||||||
|
)
|
||||||
|
|
||||||
ModelPermission.register(
|
ModelPermission.register(
|
||||||
model=Document, permissions=(
|
model=Document, permissions=(
|
||||||
|
|||||||
@@ -96,7 +96,7 @@ class UserMailerDynamicForm(DynamicModelForm):
|
|||||||
if self.instance.backend_data:
|
if self.instance.backend_data:
|
||||||
backend_data = json.loads(self.instance.backend_data)
|
backend_data = json.loads(self.instance.backend_data)
|
||||||
for key in self.instance.get_backend().fields:
|
for key in self.instance.get_backend().fields:
|
||||||
self.fields[key].initial = backend_data[key]
|
self.fields[key].initial = backend_data.get(key)
|
||||||
|
|
||||||
return result
|
return result
|
||||||
|
|
||||||
|
|||||||
@@ -12,11 +12,11 @@ class DjangoSMTP(MailerBackend):
|
|||||||
Backend that wraps Django's SMTP backend
|
Backend that wraps Django's SMTP backend
|
||||||
"""
|
"""
|
||||||
class_fields = (
|
class_fields = (
|
||||||
'host', 'port', 'use_tls', 'use_ssl', 'user', 'password'
|
'host', 'port', 'use_tls', 'use_ssl', 'username', 'password'
|
||||||
)
|
)
|
||||||
class_path = 'django.core.mail.backends.smtp.EmailBackend'
|
class_path = 'django.core.mail.backends.smtp.EmailBackend'
|
||||||
field_order = (
|
field_order = (
|
||||||
'host', 'port', 'use_tls', 'use_ssl', 'user', 'password', 'from'
|
'host', 'port', 'use_tls', 'use_ssl', 'username', 'password', 'from'
|
||||||
)
|
)
|
||||||
fields = {
|
fields = {
|
||||||
'from': {
|
'from': {
|
||||||
@@ -60,14 +60,14 @@ class DjangoSMTP(MailerBackend):
|
|||||||
'that "Use TLS" and "Use SSL" are mutually exclusive, '
|
'that "Use TLS" and "Use SSL" are mutually exclusive, '
|
||||||
'so only set one of those settings to True.'
|
'so only set one of those settings to True.'
|
||||||
), 'required': False
|
), 'required': False
|
||||||
}, 'user': {
|
}, 'username': {
|
||||||
'label': _('Username'),
|
'label': _('Username'),
|
||||||
'class': 'django.forms.CharField', 'default': '',
|
'class': 'django.forms.CharField', 'default': '',
|
||||||
'help_text': _(
|
'help_text': _(
|
||||||
'Username to use for the SMTP server. If empty, '
|
'Username to use for the SMTP server. If empty, '
|
||||||
'authentication won\'t attempted.'
|
'authentication won\'t attempted.'
|
||||||
), 'kwargs': {
|
), 'kwargs': {
|
||||||
'max_length': 48
|
'max_length': 254
|
||||||
}, 'required': False
|
}, 'required': False
|
||||||
}, 'password': {
|
}, 'password': {
|
||||||
'label': _('Password'),
|
'label': _('Password'),
|
||||||
|
|||||||
@@ -208,7 +208,7 @@ class UserMailerLogEntryListView(SingleObjectListView):
|
|||||||
return {
|
return {
|
||||||
'hide_object': True,
|
'hide_object': True,
|
||||||
'object': self.get_user_mailer(),
|
'object': self.get_user_mailer(),
|
||||||
'title': _('%s error log') % self.get_user_mailer(),
|
'title': _('Error log for: %s') % self.get_user_mailer(),
|
||||||
}
|
}
|
||||||
|
|
||||||
def get_source_queryset(self):
|
def get_source_queryset(self):
|
||||||
|
|||||||
@@ -277,10 +277,10 @@ class POP3Email(EmailBaseModel):
|
|||||||
logger.debug('ssl: %s', self.ssl)
|
logger.debug('ssl: %s', self.ssl)
|
||||||
|
|
||||||
if self.ssl:
|
if self.ssl:
|
||||||
mailbox = poplib.POP3_SSL(host=self.host, post=self.port)
|
mailbox = poplib.POP3_SSL(host=self.host, port=self.port)
|
||||||
else:
|
else:
|
||||||
mailbox = poplib.POP3(
|
mailbox = poplib.POP3(
|
||||||
host=self.host, post=self.port, timeout=self.timeout
|
host=self.host, port=self.port, timeout=self.timeout
|
||||||
)
|
)
|
||||||
|
|
||||||
mailbox.getwelcome()
|
mailbox.getwelcome()
|
||||||
|
|||||||
@@ -217,7 +217,7 @@ class POP3SourceTestCase(GenericDocumentTestCase):
|
|||||||
def user(self, username):
|
def user(self, username):
|
||||||
return
|
return
|
||||||
|
|
||||||
@mock.patch('poplib.POP3_SSL')
|
@mock.patch('poplib.POP3_SSL', autospec=True)
|
||||||
def test_download_document(self, mock_poplib):
|
def test_download_document(self, mock_poplib):
|
||||||
mock_poplib.return_value = POP3SourceTestCase.MockMailbox()
|
mock_poplib.return_value = POP3SourceTestCase.MockMailbox()
|
||||||
self.source = POP3Email.objects.create(
|
self.source = POP3Email.objects.create(
|
||||||
|
|||||||
Reference in New Issue
Block a user