Merge remote-tracking branch 'origin/master' into merge_test
This commit is contained in:
@@ -7,13 +7,15 @@
|
||||
- Fix height calculation in resize transformation
|
||||
- Improve upgrade instructions
|
||||
|
||||
2.1.5 (2016-xx-xx)
|
||||
2.1.5 (2016-11-08)
|
||||
==================
|
||||
- Backport resize transformation math operation fix (GitLab #319).
|
||||
- Update Pillow to 3.1.2 (Security fix).
|
||||
- Backport zoom transformation performance improvement (GitLab #334).
|
||||
- Backport trash can navigation link resolution fix (GitLab #331).
|
||||
- Improve documentation regarding the use of GPG version 1 (GitLab #333).
|
||||
- Fix ACL create view HTML response type. (GitLab #335).
|
||||
- Expland staging folder and watch folder explanation.
|
||||
|
||||
2.1.4 (2016-10-28)
|
||||
==================
|
||||
|
||||
9
Makefile
9
Makefile
@@ -1,12 +1,5 @@
|
||||
.PHONY: clean-pyc clean-build
|
||||
|
||||
define BROWSER_PYSCRIPT
|
||||
import sys, webbrowser
|
||||
webbrowser.open(sys.argv[1])
|
||||
endef
|
||||
export BROWSER_PYSCRIPT
|
||||
BROWSER := python -c "$$BROWSER_PYSCRIPT"
|
||||
|
||||
|
||||
help:
|
||||
@echo
|
||||
@@ -65,7 +58,6 @@ test-all:
|
||||
# Documentation
|
||||
|
||||
docs_serve:
|
||||
$(BROWSER) http://127.0.0.1:8000
|
||||
cd docs;make livehtml
|
||||
|
||||
|
||||
@@ -113,7 +105,6 @@ wheel: clean
|
||||
# Dev server
|
||||
|
||||
runserver:
|
||||
$(BROWSER) http://127.0.0.1:8000
|
||||
./manage.py runserver
|
||||
|
||||
runserver_plus:
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
Mayan EDMS v2.1.5 release notes
|
||||
===============================
|
||||
|
||||
Released: XX, 2016
|
||||
Released: November 8, 2016
|
||||
|
||||
What's new
|
||||
==========
|
||||
@@ -21,6 +21,8 @@ Other changes
|
||||
- Backport zoom performance improvement (GitLab #334).
|
||||
- Backport trash can navigation link resolution fix (GitLab #331).
|
||||
- Improve documentation regarding the use of GPG version 1 (GitLab #333).
|
||||
- Fix ACL create view HTML response type. (GitLab #335).
|
||||
- Expland staging folder and watch folder explanation.
|
||||
|
||||
Removals
|
||||
--------
|
||||
@@ -79,5 +81,7 @@ Bugs fixed or issues closed
|
||||
* `GitLab issue #331 <https://gitlab.com/mayan-edms/mayan-edms/issues/331>`_ Trash List View: Items actions should be limited
|
||||
* `GitLab issue #333 <https://gitlab.com/mayan-edms/mayan-edms/issues/333>`_ "Unable to run gpg - it may not be available."
|
||||
* `GitLab issue #334 <https://gitlab.com/mayan-edms/mayan-edms/issues/334>`_ Perfomance improvment: prevent unnecessary image.resize in TransformationZoom
|
||||
* `GitLab issue #335 <https://gitlab.com/mayan-edms/mayan-edms/issues/335>`_ Wrong HTML Content-Type in ACL->NEW
|
||||
|
||||
|
||||
.. _PyPI: https://pypi.python.org/pypi/mayan-edms/
|
||||
|
||||
@@ -9,9 +9,6 @@ The current document sources supported are:
|
||||
- Web - ``HTML`` forms with a ``Browse`` button that will open the file dialog
|
||||
when clicked to allow selection of files in the user's computer to be
|
||||
uploaded as documents.
|
||||
- Staging folder - Folder where networked attached scanned can save image
|
||||
files. The files in these staging folders are scanned and a preview is
|
||||
generated to help the process of upload.
|
||||
- POP3 email - Provide the email, server and credential of a ``POP3`` based
|
||||
email to be scanned periodically for email. The body of the email is uploaded
|
||||
as a document and the attachments of the email are uploaded as separate
|
||||
@@ -20,6 +17,19 @@ The current document sources supported are:
|
||||
the ``IMAP`` protocol.
|
||||
- Watch folder - A filesystem folder that is scanned periodically for files.
|
||||
Any file in the watch folder is automatically uploaded.
|
||||
- Staging folder - Folder where networked attached scanned can save image
|
||||
files. The files in these staging folders are scanned and a preview is
|
||||
generated to help the process of upload. Staging folders and Watch folders
|
||||
work in a similar way with the main difference being that Staging folders are
|
||||
interactive while Watch folders are automatic; documents in a Watch folder
|
||||
are uploaded periodically and documents in a Staging folder remain indefinitely
|
||||
there until an user uploads them. A preview for files in a Staging folder is
|
||||
also provided. An example of Staging folder use is when multiple people
|
||||
are scanning documents but only one person must be allowed to upload those
|
||||
documents. This one person examines the scans quality and decides what to
|
||||
upload and what to reject and have re-scanned. Watch folders can be used
|
||||
when the quality of the scans is irrelevant or when they will be known
|
||||
to be of good quality, such as when receiving e-faxes as PDFs.
|
||||
|
||||
Document source can be configure to allow document bundles to uploaded as
|
||||
compressed files which are decompressed and their content uploaded as separate
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
from __future__ import unicode_literals
|
||||
|
||||
__title__ = 'Mayan EDMS'
|
||||
__version__ = '2.1.4'
|
||||
__build__ = 0x020103
|
||||
__version__ = '2.1.5'
|
||||
__build__ = 0x020105
|
||||
__author__ = 'Roberto Rosario'
|
||||
__author_email__ = 'roberto.rosario@mayan-edms.com'
|
||||
__description__ = 'Free Open Source Electronic Document Management System'
|
||||
|
||||
@@ -26,7 +26,7 @@ class AccessControlListViewTestCase(GenericDocumentViewTestCase):
|
||||
def test_acl_create_view_no_permission(self):
|
||||
self.login(username=TEST_USER_USERNAME, password=TEST_USER_PASSWORD)
|
||||
|
||||
response = self.post(
|
||||
response = self.get(
|
||||
viewname='acls:acl_create', kwargs=self.view_arguments, data={
|
||||
'role': self.role.pk
|
||||
}
|
||||
@@ -42,6 +42,35 @@ class AccessControlListViewTestCase(GenericDocumentViewTestCase):
|
||||
permission_acl_edit.stored_permission
|
||||
)
|
||||
|
||||
response = self.get(
|
||||
viewname='acls:acl_create', kwargs=self.view_arguments, data={
|
||||
'role': self.role.pk
|
||||
}, follow=True
|
||||
)
|
||||
|
||||
self.assertContains(
|
||||
response, text=self.document.label, status_code=200
|
||||
)
|
||||
|
||||
def test_acl_create_view_post_no_permission(self):
|
||||
self.login(username=TEST_USER_USERNAME, password=TEST_USER_PASSWORD)
|
||||
|
||||
response = self.post(
|
||||
viewname='acls:acl_create', kwargs=self.view_arguments, data={
|
||||
'role': self.role.pk
|
||||
}
|
||||
)
|
||||
|
||||
self.assertEquals(response.status_code, 403)
|
||||
self.assertEqual(AccessControlList.objects.count(), 0)
|
||||
|
||||
def test_acl_create_view_with_post_permission(self):
|
||||
self.login(username=TEST_USER_USERNAME, password=TEST_USER_PASSWORD)
|
||||
|
||||
self.role.permissions.add(
|
||||
permission_acl_edit.stored_permission
|
||||
)
|
||||
|
||||
response = self.post(
|
||||
viewname='acls:acl_create', kwargs=self.view_arguments, data={
|
||||
'role': self.role.pk
|
||||
|
||||
@@ -28,16 +28,16 @@ class ACLCreateView(SingleObjectCreateView):
|
||||
model = AccessControlList
|
||||
|
||||
def dispatch(self, request, *args, **kwargs):
|
||||
self.content_type = get_object_or_404(
|
||||
self.object_content_type = get_object_or_404(
|
||||
ContentType, app_label=self.kwargs['app_label'],
|
||||
model=self.kwargs['model']
|
||||
)
|
||||
|
||||
try:
|
||||
self.content_object = self.content_type.get_object_for_this_type(
|
||||
self.content_object = self.object_content_type.get_object_for_this_type(
|
||||
pk=self.kwargs['object_id']
|
||||
)
|
||||
except self.content_type.model_class().DoesNotExist:
|
||||
except self.object_content_type.model_class().DoesNotExist:
|
||||
raise Http404
|
||||
|
||||
AccessControlList.objects.check_access(
|
||||
@@ -55,7 +55,7 @@ class ACLCreateView(SingleObjectCreateView):
|
||||
def form_valid(self, form):
|
||||
try:
|
||||
acl = AccessControlList.objects.get(
|
||||
content_type=self.content_type,
|
||||
content_type=self.object_content_type,
|
||||
object_id=self.content_object.pk,
|
||||
role=form.cleaned_data['role']
|
||||
)
|
||||
@@ -121,7 +121,7 @@ class ACLListView(SingleObjectListView):
|
||||
self.content_object = self.object_content_type.get_object_for_this_type(
|
||||
pk=self.kwargs['object_id']
|
||||
)
|
||||
except self.content_type.model_class().DoesNotExist:
|
||||
except self.object_content_type.model_class().DoesNotExist:
|
||||
raise Http404
|
||||
|
||||
AccessControlList.objects.check_access(
|
||||
|
||||
@@ -311,6 +311,12 @@ class TransformationRotate(BaseTransformation):
|
||||
|
||||
def execute_on(self, *args, **kwargs):
|
||||
super(TransformationRotate, self).execute_on(*args, **kwargs)
|
||||
|
||||
self.degrees %= 360
|
||||
|
||||
if self.degress == 0:
|
||||
return self.image
|
||||
|
||||
return self.image.rotate(
|
||||
360 - self.degrees, resample=Image.BICUBIC, expand=True
|
||||
)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
from ..base import * # NOQA
|
||||
from .base import * # NOQA
|
||||
|
||||
SIGNATURES_GPG_PATH = '/usr/bin/gpg1'
|
||||
|
||||
|
||||
5
mayan/settings/testing/gitlab-ci/base.py
Normal file
5
mayan/settings/testing/gitlab-ci/base.py
Normal file
@@ -0,0 +1,5 @@
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from ..base import * # NOQA
|
||||
|
||||
SIGNATURES_GPG_PATH = '/usr/bin/gpg1'
|
||||
@@ -1,6 +1,6 @@
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from ..base import * # NOQA
|
||||
from .base import * # NOQA
|
||||
|
||||
DATABASES = {
|
||||
'default': {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from ..base import * # NOQA
|
||||
from .base import * # NOQA
|
||||
|
||||
DATABASES = {
|
||||
'default': {
|
||||
|
||||
Reference in New Issue
Block a user