Compare commits

...

1479 Commits

Author SHA1 Message Date
Roberto Rosario
c072a24890 Merge branch 'use-preparestatic' into 'versions/next'
Switch to preparestatic (Closes: #593)

See merge request mayan-edms/mayan-edms!48
2019-05-25 00:11:09 +00:00
Jakob Haufe
fcfb705fb3 Switch to preparestatic (Closes: #593)
collectstatic failes on various test suite files which are not needed to
install Mayan EDMS. Switch over to preparestatic, which contains a
predefined ignore list.
2019-05-24 11:17:14 +02:00
Roberto Rosario
37c57056cd Add checkout details view tests
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-04-06 20:17:55 -04:00
Roberto Rosario
c721413209 Insert API context external object automatically
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-04-06 20:08:05 -04:00
Roberto Rosario
07ea45992b Add document indexing API tests
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-04-06 20:07:01 -04:00
Roberto Rosario
9708131712 Add non breakable space to avoud badge jumping
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-04-06 20:06:41 -04:00
Roberto Rosario
cdd0380f1d Merge remote-tracking branch 'origin/versions/next' into versions/next 2019-04-06 20:06:05 -04:00
Roberto Rosario
1eb9975dd6 Fix server side AJAX template rendering
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-04-06 20:05:33 -04:00
Roberto Rosario
4d8dc8e552 Fix multiple tag selection wizard step
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2019-04-06 20:04:39 -04:00
Roberto Rosario
97fb5f96a7 Reject email attachments of size 0
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-04-06 19:57:50 -04:00
Manoel Brunnen
d4403daa61 Workaround for pip bug #6179
See https://github.com/pypa/pip/issues/6197
2019-04-02 13:39:59 -04:00
Roberto Rosario
ff6e4294e9 Merge commit '5c9ff90d288e48d0cec78f6446fcc904df72da16' into versions/next 2019-04-02 13:39:36 -04:00
Roberto Rosario
eb6f88dfd1 Fix user management tests
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2019-04-02 13:39:21 -04:00
Roberto Rosario
83a4368eef Simplify document indexing test
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2019-04-02 13:39:00 -04:00
Roberto Rosario
b6e0de01f3 Make random PK mixin work with pre_save signals
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2019-04-02 13:38:21 -04:00
Roberto Rosario
bda4902bc7 Checkout manager optimization
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2019-04-02 13:38:02 -04:00
Roberto Rosario
5de6fbe914 Merge branch 'feature/mailing_events' into versions/next
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-03-21 19:56:44 -04:00
Roberto Rosario
3bbef4253a Merge branch 'features/mercs_5_6' into 3_way_merge
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-03-21 19:48:13 -04:00
Roberto Rosario
6dd61f187f Merge remote-tracking branch 'origin/versions/next' into 3_way_merge
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-03-21 19:46:22 -04:00
Roberto Rosario
d55e9c0944 Update Makefile
Add deletion of Python3 cache files to the clean target.
Allowing passing extra arguments to the test targets.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-03-21 19:37:08 -04:00
Roberto Rosario
862c3ff568 PEP8 style cleanups
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2019-03-18 04:43:31 -04:00
Roberto Rosario
a815c3f538 Fix JavaScript downloader defaults
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2019-03-18 04:33:36 -04:00
Roberto Rosario
54539c9d03 Update requirement versions and removals
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2019-03-18 04:24:20 -04:00
Roberto Rosario
2fbe4625c0 Add workflow transition API views
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-03-17 17:57:18 -04:00
Roberto Rosario
62c92ba6fd Add support for runtime queryset method
Allow passing runtime queryset to FilteredPrimaryKeyRelatedField
using a method name via the source_queryset_method attribute
or a default method name of "get_<field_name>_queryset".

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-03-17 17:53:30 -04:00
Roberto Rosario
7aa4b480d7 Fix failing ACL test
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-03-16 21:55:47 -04:00
Roberto Rosario
490bbee81e Fix metadata wizard step
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-03-16 21:55:21 -04:00
Roberto Rosario
5850ea99d4 Add workflow state API views
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-03-16 15:10:42 -04:00
Roberto Rosario
952380502b Complete basic workflow CRUD API views
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-03-15 19:43:54 -04:00
Roberto Rosario
97c9cfda6a Start workflow app API refactor
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-03-15 19:29:39 -04:00
Roberto Rosario
c152156a11 Refactor metadata app API
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-03-15 04:49:51 -04:00
Roberto Rosario
0c312b343e Unify BaseAPITestCase with GenericViewTestCase
Make BaseAPITestCase a subclass of GenericViewTestCase.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-03-15 03:04:17 -04:00
Roberto Rosario
7e141c1d04 Add FilteredPrimaryKeyRelatedField
FilteredPrimaryKeyRelatedField is a subclass of PrimaryKeyRelatedField
that filters its queryset by a permission.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-03-15 03:03:06 -04:00
Roberto Rosario
50d4aa0e22 Allow disabling test's expected_content_type
Setting expected_content_type to None will now disable
the reponse HTTP content type checking. Added
to allow API tests to be a subclass of the test view test
case and support all the mixins without having to declare
them separately.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-03-15 02:56:34 -04:00
Roberto Rosario
bf733be4c5 Display full trace during app loading exceptions
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-03-15 02:55:27 -04:00
Roberto Rosario
da2ff0bdd8 Allowing adding an additional test permission
For tests that required using two test permission, like
the tests for .restrict_queryset_by_accesses().

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-03-05 20:32:31 -04:00
Roberto Rosario
4b444a75cc Add support for multi access filtering
This change allows filtering a queryset by multiple permission
following a logic operator to define the relationship.

Example: In order to access an instance of MetadataTypeDocumentType
the document type view and metadata type view permissions are
required. The computation for this access control can now be
coded using .restrict_queryset_by_accesses. Custom permission
checking in the view is no longer required.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-03-05 20:30:26 -04:00
Roberto Rosario
378511aea3 Finish fixing failing ACL app tests
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-03-04 16:20:12 -04:00
Roberto Rosario
2a1e060907 TestModelMixin: Perform stateless model creation
Don't delete test models at the end of the test case.
Failed test cases don't execute the tearDown() method.
Instead perform model registry cleanup before creating
any new test model.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-03-04 16:18:39 -04:00
Roberto Rosario
2cfd4a9095 Add new ACL app API tests
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-03-03 20:02:36 -04:00
Roberto Rosario
711a28dccf Test models: Clear ContentType cache
Clear the ContentType cache when adding or removing
test models.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-03-03 20:01:50 -04:00
Roberto Rosario
b99cf97558 Improve REST mixins and add a new one
Add type casting to ExternalObjectListSerializerMixin via
the external_object_list_pk_type option.

Add an ExternalObjectSerializeMixin for related objects.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-03-03 14:31:48 -04:00
Roberto Rosario
442faca915 Update test models to generate random PK
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-03-02 17:32:38 -04:00
Roberto Rosario
0f84b7a723 Merge branch 'features/mercs_5_6' of gitlab.com:mayan-edms/mayan-edms into features/mercs_5_6 2019-03-02 17:10:25 -04:00
Roberto Rosario
2a67cf271e Refactor ACL app API
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-03-02 16:03:29 -04:00
Roberto Rosario
0cbd9e0d45 ACLs: Make get_inherited_permissions recursive
Update .get_inherited_permissions() to grab the permissions
of an object up the parent tree. Also add the role
permissions. Finally filter all the permissions by those
that apply to the object.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-03-02 01:51:23 -04:00
Roberto Rosario
48aad4f356 Add mixin to provide temporary test models
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-03-02 01:49:30 -04:00
Roberto Rosario
5c5979c5af Sort import
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-02-25 21:10:09 -04:00
Roberto Rosario
54100f7538 Role permissions API: Add permission checking and tests
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-02-25 21:09:21 -04:00
Roberto Rosario
8599d69d23 Refactor dynamic search app API
Convert the API to use viewsets.

The search function is now a service of the search model
resource.

The simple and advance search are now the same service. The
difference is determined by the URL query. A ?q= means a
simple search. For advanced search pass the search model
fields in the URL query, example: ?q=document_type__label=

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-02-23 05:08:39 -04:00
Roberto Rosario
23d56c3147 Improve ClientMethodsTestCaseMixin
Reduce repeated code.

Add support for passing query string dictionary to
the test client.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-02-23 05:04:28 -04:00
Roberto Rosario
7e1de2623c Update OCR app
Normalize API base names.

Update ViewSet base class, model classes are not needed
the OCR API views.

Split API tests into content and submit tests.

Puntuate view test strings.

Make use of success and title strings.

Make use of external object mixin in document type
settings view.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-02-22 23:49:48 -04:00
Roberto Rosario
21da6742b0 Increate default maximum title lenght to 120
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-02-22 23:48:04 -04:00
Roberto Rosario
d546967d1d Refactor the parsing app API
Add additional API and view tests.

Add success and multi document titles strings.

Make use of external mixin in the document type submit view.

Puntuate all view text strings.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-02-22 23:46:15 -04:00
Roberto Rosario
3917ca667a Fix typo in docstring
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-02-22 04:09:11 -04:00
Roberto Rosario
5c20a92f27 Add the RecentDocument mixin
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-02-22 04:07:42 -04:00
Roberto Rosario
a91bc6716d Register the Tag serializer
Register the Tag model to TagSerializer relationship
used by the events API.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-02-22 04:06:36 -04:00
Roberto Rosario
3fc463bb1c Fix event commit
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-02-22 04:06:06 -04:00
Roberto Rosario
2654c96e1c Update success message and external object usage
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-02-22 04:05:24 -04:00
Roberto Rosario
744d252640 Update classes and API URLs for uniformity
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-02-22 04:04:16 -04:00
Roberto Rosario
d74d13450c Use underscore in API resource for uniformity
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-02-22 04:02:52 -04:00
Roberto Rosario
b975c75c2f ContentTypeViewMixin allow chaging URL kwargs
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-02-22 04:01:46 -04:00
Roberto Rosario
1cb3f9fe60 Remove AJAX workers
Specified in ef415ef826.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-02-22 04:00:47 -04:00
Roberto Rosario
68c67abaa3 Improve how to get queryset from a content type
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-02-22 03:58:48 -04:00
Roberto Rosario
ef415ef826 Refactor the events app API
Use viewsets for the events app API.

Use new link badge support for the unread notification
count display.

Remove AJAX workers support now that it is now needed
anymore.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-02-22 03:57:07 -04:00
Roberto Rosario
5a8e691388 Navigation: Add support for link badges
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-02-22 03:56:29 -04:00
Roberto Rosario
5f264e2aae Initial refactor of the event's app API
Signed-off-by: Roberto Rosario <Roberto.Rosario.Gonzalez@mayan-edms.com>
2019-02-20 04:21:56 -04:00
Roberto Rosario
0e524e44ed Fix failing mailer tests
Signed-off-by: Roberto Rosario <Roberto.Rosario.Gonzalez@mayan-edms.com>
2019-02-19 03:38:09 -04:00
Roberto Rosario
023d82c96c Update document API to use new MayanAPIviewset
Signed-off-by: Roberto Rosario <Roberto.Rosario.Gonzalez@mayan-edms.com>
2019-02-19 03:37:16 -04:00
Roberto Rosario
9370b2effb Update documents app serializers
Update serializers to be a subclass of
LazyExtraFieldsHyperlinkedModelSerializer to allow adding
more fields remotely.

Update URL fields to use MultiKwargHyperlinkedIdentityField.

Rename URL fields for uniformity.

Signed-off-by: Roberto Rosario <Roberto.Rosario.Gonzalez@mayan-edms.com>
2019-02-19 03:34:56 -04:00
Roberto Rosario
30e8327db9 Update document API sub URLs for uniformity
Signed-off-by: Roberto Rosario <Roberto.Rosario.Gonzalez@mayan-edms.com>
2019-02-19 03:27:23 -04:00
Roberto Rosario
7eaa096ad7 Convert the success header generation to a mixin
Signed-off-by: Roberto Rosario <Roberto.Rosario.Gonzalez@mayan-edms.com>
2019-02-19 03:25:43 -04:00
Roberto Rosario
495cd18e34 Add multiple argument support to HyperlinkField
Signed-off-by: Roberto Rosario <Roberto.Rosario.Gonzalez@mayan-edms.com>
2019-02-19 03:25:09 -04:00
Roberto Rosario
8c3e4fa5c0 Improve Document Tag API URL
Update the API routers registration to not duplicate
the document's URL parameter definition.

Signed-off-by: Roberto Rosario <Roberto.Rosario.Gonzalez@mayan-edms.com>
2019-02-19 03:23:51 -04:00
Roberto Rosario
c2dd01d51e Refactor the OCR app API
This refactor adds two new endpoints to view the OCR
content of versions and documents.

Signed-off-by: Roberto Rosario <Roberto.Rosario.Gonzalez@mayan-edms.com>
2019-02-19 03:21:36 -04:00
Roberto Rosario
e03f017e7f Remove sidebar menu from apps
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-02-15 04:33:42 -04:00
Roberto Rosario
0b8b3c31d2 Update DocumentSerializer to LazyExtraFields
Allow changing the fields of the DocumentSerializer
in runtime.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-02-15 04:28:35 -04:00
Roberto Rosario
931d31cf02 Remove sidebar menu from documents app
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-02-15 04:27:17 -04:00
Roberto Rosario
5d149c5968 Improve tag workflow actions with transactions
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-02-15 04:26:46 -04:00
Roberto Rosario
d200f6d3c9 Update tag app test
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-02-15 04:26:18 -04:00
Roberto Rosario
5ef12555a4 Update success and title messages in views
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-02-15 04:25:33 -04:00
Roberto Rosario
11252ac397 Remove unused imports
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-02-15 04:24:55 -04:00
Roberto Rosario
1c3595c66e Add document attach and remove methods to Tag
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-02-15 04:24:25 -04:00
Roberto Rosario
bb7bbb299b Add document methods to attach and remove tags
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-02-15 04:24:05 -04:00
Roberto Rosario
070df8ae37 Remove unsed tag icon
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-02-15 04:23:25 -04:00
Roberto Rosario
95faa44d76 Don't make the tag selection required
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-02-15 04:23:00 -04:00
Roberto Rosario
cae7b8f8c5 Add document tags API views
These views allow accesing the tags list of a document as
well as attaching or removing tags in bulk.

The URLs for tag list, attach and remove are added to the
DocumentSerializer.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-02-15 04:22:37 -04:00
Roberto Rosario
bb6a827f28 Add LazyExtraFieldsHyperlinkedModelSerializer
This class is a mixin of LazyExtraFieldsSerializerMixin and
serializers.HyperlinkedModelSerializer. It allows adding fields
to a 3rd party app serializer without having to import the serializer.
Referencing is done using the dotted path of the serializer.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-02-15 04:18:33 -04:00
Roberto Rosario
863a2680a9 Fix id_list splitting
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-02-15 04:17:48 -04:00
Roberto Rosario
efde174b1a Add MayanAPIGenericViewSet
This viewset allow adding generic action API endpoints.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-02-15 04:16:30 -04:00
Roberto Rosario
6eb986f7d1 Add HyperlinkField for serializers
This field allow adding URLs to ModelSerializers.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-02-15 04:15:19 -04:00
Roberto Rosario
d85e838480 Add icon to workflow transition triggers
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-02-14 04:04:21 -04:00
Roberto Rosario
b546be8ea2 Remove sidebar menu from workflow app
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-02-14 04:03:52 -04:00
Roberto Rosario
ba17fe742a Update success_message variable
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-02-14 04:01:37 -04:00
Roberto Rosario
5d716cd69d Add the event view link for roles
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-02-14 03:56:11 -04:00
Roberto Rosario
529ab2a6ad Tool and Setup view updates
Simplify the context methods.

Add subtitle explanations for the views.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-02-14 03:02:27 -04:00
Roberto Rosario
b25c3be969 Navigation improvements
Rename the get_menu_links and get_menus_links to
navigation_resolve_menu.

Change the return value of the menu resolving to include
the resolved object.

Update the links display templates to show which object the
links belong to when there is more than one object.

Update the links display templates to show which menu
the links belong to when there is more than one menu.

Remove the sidebar menu and unify its links with the
secondary menu.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-02-14 03:02:12 -04:00
Roberto Rosario
18e5ee1e4f ACL app updates
Update the ACL permission view to use the new AddRemoveView.

Add ACL created and ACL edit events.

Add permission adding and removal accesors to the ACL model.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-02-14 02:30:51 -04:00
Roberto Rosario
6a57a5a7de Improve filtering in AddRemove View
Make sure to always used the base filtered source queryset.

Remove the grouped attribute which is subclass specific.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-02-14 02:27:12 -04:00
Roberto Rosario
8589004173 Add support for single or multiple objects modes
View that use the MultipleObjectMixin can now fully operate
as single object or multiple object views.

Add the self.view_mode_single and self.view_mode_multiple flags.

Add support for single, singular and plural titles and success
messages via:

success_message_single, success_message_singular,
sucess_message_plural, title_single, title_singular and
title_plural class attributes.

Insert object_list and object as attributes of the view class
to avoid calling the queryset again.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-02-12 18:07:44 -04:00
Roberto Rosario
23b1375289 Enclose add/remove tag methods in transactions
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-02-12 03:42:37 -04:00
Roberto Rosario
fb608bba98 Fix issue in ExternalObjectListSerializerMixin
Fix error when only an ID list field is specified.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-02-12 03:40:55 -04:00
Roberto Rosario
d28bb60abd Fix tag attach wizard step
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-02-12 03:40:12 -04:00
Roberto Rosario
f3f7b4bb7d Refactor the permissions app
Use the new AddRemove View for the Role's group and
permissions views as well as the Group's role views.

Convert the API to use viewsets.

Add more tests.

Add role created and edited events.

Add event subscription support to roles.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-02-12 03:36:16 -04:00
Roberto Rosario
1fee7260e4 Allow adding extra buttons to forms
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-02-12 03:35:43 -04:00
Roberto Rosario
dcd1af685a Add new AddRemoveView view
Add a new view based on AssignRemove with extra features
and filtering. AddRemoveView also has two new buttons:
Add all, Remove all.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-02-12 03:34:14 -04:00
Roberto Rosario
b633238610 Fix pk_list_field processing
This field was being ignored. Improved the code to check for
values in sequence.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-02-08 00:53:57 -04:00
Roberto Rosario
ae1634c378 Users: Finish API refactor
- Update groups add, remove and users add, remove methods trigger
only one event on the parent method and multiple on the child method.

- Add missing group_list, _add, _remove permissions.

- Monkey patch Django's User and Group model save method to
trigger the creation and edited events.

- Monkeypatch user sorting to silence warnings.

- Improve test mixins to allow reuse of view and API view
requests.

- Finish adding all API tests.

- Add events test from API view requests.

- Remove event commits from views.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-02-08 00:44:26 -04:00
Roberto Rosario
61ebda6e63 REST API app updates
- Add back support for API views but using the
api_urlpatterns list. Needed for the current user
API until a dynamic route router is implemented that
can allow a viewset action to specify its entire URL.

- Make sure the user is authenticated before
trying to the user permissions.

- Improve how external_object_list options are read from
the class.

- None authenticated users will get a blank queryset if the
view doesn't require a permission.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-02-07 20:13:35 -04:00
Roberto Rosario
e4af406d5f Refactor the user management app API
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-02-07 20:12:55 -04:00
Roberto Rosario
ee2637dddc Common: Improve API view and tests
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-02-06 21:57:02 -04:00
Roberto Rosario
7d3677acfb View name cleanups
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-02-06 21:37:46 -04:00
Roberto Rosario
999e164c3d Refactor the Django GPG app API views
Convert the Django GPG app API view to use viewsets.

Add key-list API view test.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-02-06 21:36:27 -04:00
Roberto Rosario
278f97b7e4 Start tags app API refactor
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-02-06 05:20:42 -04:00
Roberto Rosario
ea3ba2c4de Complete the MOTD app API views
Add per viewset action permissions.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-02-06 05:19:31 -04:00
Roberto Rosario
627056f1ae Refactor the REST API app
Remove the APIRoot view.

Remove the Endpoint class.

Remove the EndpointSerializer.

Move API documentation generation from the root urls module
to the app's urls module.

Update the app API URL generation to be based on viewsets
instead of an custom api_urls list.

Remove MayanObjectPermissionsFilter and replace it with
MayanViewSetObjectPermissionsFilter which allows mapping
a required permission to a specific viewset action.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-02-06 05:19:07 -04:00
Roberto Rosario
7ba47d5c5f Update mailer app
Sort arguments.

Fix failing tests.

Sort view classes.

Replace get_object() with self.object in the delete and
edit views.

Use ExternalObjectMixin to simplify views.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-02-06 01:08:14 -04:00
Roberto Rosario
27517c04f2 Fix ACL action tests
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-02-06 00:51:26 -04:00
Roberto Rosario
e9cdc958f6 Fix typo in link view
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-02-05 05:54:36 -04:00
Roberto Rosario
8284dcf306 Improve next_url and previous_url calculation
Instead of calculating these values in the dispatch
method, add new methods to calculate and insert the values of
next_url and previous_url in the context.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-02-05 05:50:25 -04:00
Roberto Rosario
a4ef6b3e8a Small code cleanups
Add keyword arguments.

Replace get_queryset with get_object_list.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-02-05 05:49:47 -04:00
Roberto Rosario
71c2a7773e Support separate sortable fields
Add support to sort a model column by a field
other than the one being displayed.

Fix the missing column issue in the list subtemplate.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-02-05 05:47:40 -04:00
Roberto Rosario
bd12d587ee Refactor document indexing app
Convert half the widget to HTML widgets.

Rename links and views to use the nomeclature _template_
and _instance_ to differenciate between index instances
and index templates.

Update URL parameters to use the "_id" form.

Add more tests.

Add model permission inheritance to the IndexTemplateNode,
and IndexInstanceNode models.

Remove the level and document count display from the
instance node. Display instead the total items.

Use a FilteredSelectionForm subclass to display the list
of index templates to rebuild.

Add missing icons.

Add keyword arguments to links.

Modernize tests to use the document test mixin.

Update the permission requirements for the index template
document type selection screen. The document type view
permission is now required in addition to the index
template edit permission.

Use ExternalObjectMixin to reduce the code in all views.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-02-05 05:47:10 -04:00
Manoel Brunnen
5c9ff90d28 Fix libssl-dev dependency installation
The apt package informations have already been removed at this point.
Also, this dependency is not armhf specific.
2019-02-04 11:24:50 +01:00
Roberto Rosario
4ab2b4fee0 Merge branch 'versions/next' into features/mercs_5_6
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-02-03 23:48:10 -04:00
Roberto Rosario
67cd01f5ae Update permission variable name
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-02-03 23:44:29 -04:00
Roberto Rosario
f93ae2f395 Don't override success_url everytime
Only override success_url if self.get_post_object_action_url()
provides an alternative.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-02-03 23:43:34 -04:00
Roberto Rosario
0918931713 Add test mixin to generate random document types
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-02-03 23:43:14 -04:00
Roberto Rosario
aa95a61451 Refactor metadata app
Update permission variable name from
"permission_document_metadata_" to "permission_metadata_".

Fix failing tests.

Add test for same metadata type mixin.

Split metadata add and remove test into test for GET and
POST requests.

Remove use of urlencode and instead use furl.

Simplify view using self.action_count and
self.action_id_list.

Use ExternalObjectMixin to remove repeated code.

Move the repeated code to test for all documents to
be of the same type into its own mixin.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-02-03 23:37:52 -04:00
Roberto Rosario
dcea32ae38 Refactor file metadata app
Add translatable label to the label admin method.

Add access association from DocumentVersionDriverEntry to
document version.

Enclose process method and event commit in a transaction.

Update process method to not error out if EXIF tool
is not found.

Update views and tests to use ExternalObjectMixin and
comply with MERCs 5 and 6.

Signed-off-by: Roberto Rosario <Roberto.Rosario.Gonzalez@gmail.com>
2019-02-03 19:22:49 -04:00
Roberto Rosario
4376d76c8a Load the converter class on demand
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-02-01 04:20:47 -04:00
Roberto Rosario
5b6a6bccb2 Add columns for duplicated document proxies
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-02-01 04:19:53 -04:00
Roberto Rosario
991bd9df32 Insert the external object into the view
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-02-01 04:19:14 -04:00
Roberto Rosario
6143cb5155 Sync list header code to row code
Add the list display code to display columns
marked as identifier.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-02-01 04:17:26 -04:00
Roberto Rosario
e5cd5a40c3 Improve ACL navigation
Update the ACL delete icon for uniformity.

Insert both the ACL and object in the view to also
display the ACL permissions and delete view when
viewing the ACL of an object.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-02-01 04:15:16 -04:00
Roberto Rosario
f92d99bd9a Refactor the converter app
Don't cache the entire converter class to lower memory usage.
Instead a get_converter_class() function is now provided to
load the converter backend class.

Add model permission inheritance to transformations to
removel custom permission checking code in the views.

User keyword arguments.

Update URL parameters to the '_id' form.

Add missing edit and delete icons. Improve the create
icon using composition.

Update add to comply with MERCs 5 and 6.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-02-01 04:00:37 -04:00
Roberto Rosario
8e66eefe7c Move file and storage code to the storage app
The setting COMMON_TEMPORARY_DIRECTORY is now
STORAGE_TEMPORARY_DIRECTORY.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-01-31 22:30:51 -04:00
Roberto Rosario
125a4317f4 Add custom DatabaseWarning
This warning is used to categorize the SQLite production usage
warning.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-01-31 22:23:23 -04:00
Roberto Rosario
0a864c2f07 Update ADMIN references to SUPERUSER
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-01-31 06:11:20 -04:00
Roberto Rosario
0919718114 Update app to use new hooks interface
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-01-31 06:10:45 -04:00
Roberto Rosario
9328a3e26e Make new version upload link smarter
Use the new document pre save hooks to disable the
new version upload link via external functions.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-01-31 06:09:11 -04:00
Roberto Rosario
cce6636b05 Improve document version hook system
Add support for new pre save hooks.

Hooks are now lists of functions instead of dictionaries.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-01-31 06:07:59 -04:00
Roberto Rosario
d5fc50272d Enable pre save hook
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-01-31 06:07:29 -04:00
Roberto Rosario
e97dde5b46 Enclose document type change in a transaction
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-01-31 05:59:11 -04:00
Roberto Rosario
495ac8d196 Object action mixin
Add post_object_action_url property to redirect the view after
all items in the queryset have been processed.

Add the exception instance in the error message context.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-01-31 05:57:44 -04:00
Roberto Rosario
3c2d2d1087 Update comment
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-01-31 05:57:18 -04:00
Roberto Rosario
e007af6b3f Refactor checkouts app
Change "checkin" usage to "check_in".

Update URL parameters to the "_id" form.

Add support to checkout and check in multiple documents.

Optimize queries that used an ID list of documents for
filtering using values_list('pk', flat=True). These
queries now use .values('pk') as a subquery.

Add pre save hooks to block new document version uploads.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-01-31 05:57:01 -04:00
Roberto Rosario
3976766abe Autoadmin: Fix failing test
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-01-31 01:20:41 -04:00
Roberto Rosario
43d79a9d86 Django settings: Add defaults, add new setting
Add support for LOGOUT_REDIRECT_URL.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-01-31 01:13:34 -04:00
Roberto Rosario
66670a5d59 Update fallback to redirect view
When there is no HTTP referer fallback to
common.settings_home_view instead of LOGIN_REDIRECT_URL.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-01-31 01:10:59 -04:00
Roberto Rosario
a06c633568 Authentication: Use class based views
Update all views to use the new Django authentication class
based views.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-01-31 01:08:53 -04:00
Roberto Rosario
c61f709c1b Fix authentication app tests
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-01-31 01:05:28 -04:00
Roberto Rosario
38c4643302 Simplify RestrictedQuerysetMixin queryset return
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-01-30 17:12:01 -04:00
Roberto Rosario
65d75dafde Fix and improve test for the ACL app
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-01-30 17:11:15 -04:00
Roberto Rosario
46812ab3d3 Fix ACL filtering case #3
Test case #3: Generic Foreign Key, multiple ContentTypes + object
IDs.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-01-30 17:09:46 -04:00
Roberto Rosario
4ba2d375af Update generic view and check access interfaces
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-01-30 03:54:10 -04:00
Roberto Rosario
b4a81ee0bc Random ID test mixin: Restore save method
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-01-30 03:29:12 -04:00
Roberto Rosario
08fac9fd9d Events: Update generic view interface
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-01-30 03:11:07 -04:00
Roberto Rosario
5bab080553 Workflows: Update generic view interface
Add icons for the workflow runtime proxy views.

Fix failing tests.

Convert runtime proxy links to use the new list facet menu.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-01-30 03:08:15 -04:00
Roberto Rosario
f65f363361 Refactor user management app
Add keyword arguments.

Update view resolutions and URL parameters to the '_id' form.

Remove code from create and edit subclasses and user
the super class error checking.

Cache the view object instead of using .get_object()
every time.

Movernize tests.

Update views to comply with MERCs 5 and 6.

Split UserTestMixin into mixins for Groups and Users tests.

Add super delete and detail tests.

Remove redundant superuser filtering from views.

Add transactions to views that also commit events.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-01-29 13:35:10 -04:00
Roberto Rosario
3bd33db023 Update serializer_string to serializer_path
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-01-29 04:32:57 -04:00
Roberto Rosario
b4188de727 Allow passing id_lists from POST requests
Normally the MultipleObjectMixin class view only allows
id_list from the GET request. This is updated to allow
that query from POST requests like those produced by the
view tests.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-01-29 04:30:32 -04:00
Roberto Rosario
fcfe7686fa Update document transformation links and views
Update the URL nomeclature for uniformity.

Add document transformation link tests and improve
the transformation view tests.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-01-29 04:29:27 -04:00
Roberto Rosario
a64bc61810 Allow defining SourceColumns without attributes
SourceColums that don't specify an attibute or function
will receive the instance itself instead.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-01-29 04:27:50 -04:00
Roberto Rosario
da638dc7f9 Sort class property
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-01-29 04:27:25 -04:00
Roberto Rosario
b5839c0662 Refactor the tags app
Remove the widget from the model.

Add keyword arguments.

Separate form widgets from html widgets. HTML widgets now go
in the html_widgets module.

Update the TagMultipleSelectionForm class to be a subclass of
FilteredSelectionForm.

Move Select2 specific JavaScript from the appearence app to the
tags app.

Update tag attachment and removal view names.

Modernize tests.

Add more tests.

Consolidate repeated test code into test mixins.

Update views to comply with MERCs 5 and 6.

Use uniform nomeclature for URLs.

Update URLs parameters to use the '_id' form.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-01-29 04:20:54 -04:00
Roberto Rosario
ef5e0c2d86 Remove last usage of .filter_by_access()
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-01-29 04:18:02 -04:00
Roberto Rosario
fbb3a64bce Update check_access interface
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-01-28 05:40:22 -04:00
Roberto Rosario
c09b58894b Update views to import from common.generics
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-01-28 05:39:44 -04:00
Roberto Rosario
eae5359cdf Remove the old check_permissions implementation
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-01-28 05:36:37 -04:00
Roberto Rosario
27546dadd9 Navigation: Update ACL interface
Update the check_permission interface usage.

Use the model's default_manager instead of the explicit
.objects manager.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-01-28 05:35:24 -04:00
Roberto Rosario
74dfa53787 Update documents app
Rename the DeletedDocument proxy model to a TrashedDocument.

Rename the deleted_document views to trashed_document.

Rename the document and deleted_document URL parameters to
trashed_document.

Update URL parameters to the '_id' form.

Add keyword arguments.

Update use of .filter_by_access().

Enclose trashed document restore method in a transaction.

Sort arguments.

Update app for compliance with MERCs 5 and 6.

Add document page view tests.

Add favorite document view tests.

Movernize tests.

Replace use of urlencode with furl.

Update views to use ExternalObjectMixin.

Refactor the document and version download views.

Rename the DocumentDocumentTypeEditView to DocumentChangeTypeView.

Move the trashed document views to their own module.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-01-28 05:25:48 -04:00
Roberto Rosario
7532429b0b Refactor common generic views
Add keyword arguments.

Sort arguments.

Unify the ObjectListPermissionFilterMixin and
ObjectPermissionCheckMixin into the RestrictedQuerysetMixin.

Add MultipleObjectDownloadView.

Update SingleObjectDownloadView to do queryset filtering.

The method that returns the base queryset for views is
now named get_source_queryset().

The views now use .get_object_list as a multi object
homologous of get_object. The queryset returned by
.get_object_list is restricted by access.

Make MultipleObjectMixin a subclass of Django's
SingleObjectMixin to reduce repeated code.

All generic views are now imported from common.generics and not
from common.views.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-01-28 05:18:33 -04:00
Roberto Rosario
9261b6e687 Remove deprecation comment
With the removal of the support for a related field in
.restrict_queryset() the deprecation comment can now be
removed.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-01-28 04:52:05 -04:00
Roberto Rosario
33e0e694e3 Smart settings: Remove the 'is_path' argument
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-01-25 01:40:29 -04:00
Roberto Rosario
4937d8b776 Update document signatures app
Add keyword arguments.

Remove source column functions and move their code to the model.

Use the FilteredSelectionForm for the key selection in the
document version signing view.

Update the field definition of the DetailForm subclasses
to use the new internface.

Update URL parameters to use the "_id" form.

Update views filtering to comply with MERC 6.

Move repeated test code to its own test mixin.

Update links to work with the new Link class interface.

Modernize tests.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-01-25 01:32:05 -04:00
Roberto Rosario
890f872681 Add keyword argument
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-01-25 01:30:05 -04:00
Roberto Rosario
9ce930367d Remove use of object_related view attribute
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-01-25 01:29:23 -04:00
Roberto Rosario
746f40dda0 Add missing line in introspect_attribute
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-01-25 01:26:21 -04:00
Roberto Rosario
319b74c85f Force use of get_object_list method
Update the SingleObject Delete, Detail and Download views
to force use of a get_object_list method instead of allowing
subclasses to override the get_queryset method and bypass
the object permission checks.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-01-25 01:24:54 -04:00
Roberto Rosario
2ed7858acb Move filterted from initialization
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-01-25 01:24:19 -04:00
Roberto Rosario
c5d4054fb6 Add test mixin to generate random primary keys
Add a new mixin to monkey patch the Model class to
force each newly created model instance to use a randomly
generated primary key.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-01-25 01:22:57 -04:00
Roberto Rosario
382995ae40 Update ACLs app
Remove support for passing a related field argument when
checking for access for restricting a queryset.

Remove a duplicate permission check.

Fix bug when filtering the direct ACL for an object,
the ACL query was filtering by the ACL ID instead of the
object ID.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-01-25 01:18:44 -04:00
Roberto Rosario
f076a49d2d Deprecate the check_permissions method
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-01-25 01:17:21 -04:00
Roberto Rosario
c5ce20bbea Remove role permission grant revoke permissions
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-01-25 01:16:48 -04:00
Roberto Rosario
9203977261 Update all links to the new Link class interface
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-01-25 01:13:53 -04:00
Roberto Rosario
daf79983aa Update Link class interface
Remove Link class support for multiple permissions. Accept
only one permission for each link. Remove support for the
permission related field.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-01-25 01:11:51 -04:00
Roberto Rosario
75fd7647d4 Keys: Update use of DetailForm
Fix absolute URL keyword argument.

Move detail generation to the model.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-01-23 14:49:59 -04:00
Roberto Rosario
8c085331f1 DetailForm: Use Meta class instead
Instead of class attributes, make a generic reusable the
FormOption class and update the DetailForm to use a Meta
class for options.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-01-23 14:48:23 -04:00
Roberto Rosario
3f48a5549e Sort source form definitions
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-01-22 22:38:37 -04:00
Roberto Rosario
c059f1f021 Fix the cabinet wizard step
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-01-22 22:37:24 -04:00
Roberto Rosario
1d0ebbab64 FilteredSelectionFormOptions updates
Fix displaying the name of the subclass when the
queryset is missing.

Add support for passing a new argument to specify
if the field is required or not.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-01-22 22:35:37 -04:00
Roberto Rosario
a769cc92e3 Fix staging file delete view
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-01-22 22:21:49 -04:00
Roberto Rosario
205ca594f5 Replace filter_by_access with restrict_queryset
With the interface finalized, replace .filter_by_access() in
the generic view mixins with restrict_queryset().

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-01-22 22:16:56 -04:00
Roberto Rosario
108c54630f Update source app
Sort arguments.

Add keyword arguments.

Update views regexes.

Update URL parameters to use the "_id" form.

Move setting literals to the literals.py module.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-01-22 04:27:00 -04:00
Roberto Rosario
c7bd2ee8f2 Update document states app
Change the app view namespace from 'document_states' to
'workflows'.

Add missing icons.

Improve view names.

Split views into 3 modules: workflows views, runtime proxy views
and instance views.

Update views to comply with new MERCs 5 and 6.

Fix failing tests.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-01-22 03:19:30 -04:00
Roberto Rosario
55356c4781 Update document state app
Sort arguments. Add keyword arguments. Update URL parameters to
the '_id' form.

Signed-off-by: Roberto Rosario <Roberto.Rosario.Gonzalez@gmail.com>
2019-01-21 20:07:40 -04:00
Roberto Rosario
83a9b5a60a Update OCR app
Add keyword arguments. Update URL parameters to the "_id" form.
Updated view tests.

Signed-off-by: Roberto Rosario <Roberto.Rosario.Gonzalez@gmail.com>
2019-01-21 19:24:00 -04:00
Roberto Rosario
50333d1326 Update smart settings app
Sort arguments. Add keyword arguments.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-01-21 04:06:31 -04:00
Roberto Rosario
ad7c77b4f3 Update dynamic search app
Sort methods. Update use of .filter_by_access() to
.restrict_queryset().

Change the method to so the final object
filtering. Instead of expressing the pk list and remove the
duplicated using a set, pass the queryset as a subquery to
the object filter. This moves the processing to the database
instead of holding a list of an unknown number of primary
keys in the memory.

Add keyword arguments.

Update tests to use the latest user test case mixin interface.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-01-21 03:53:55 -04:00
Roberto Rosario
166183dff9 Update metadata app
Sort arguments. Add keyword arguments. Update URL parameters
to the '_id' form. Remove use of .check_access() from views.
Sort methods.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-01-21 03:31:19 -04:00
Roberto Rosario
09edab5027 Update lock managet app
Add keyword arguments. Sort imports. Move settings and test
literals to their own module.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-01-21 02:50:34 -04:00
Roberto Rosario
027a853885 Update events app
Add keyword arguments. Update URLs for uniformity.
Update URL parameters to the '_id' form. Update
views to remove use of .check_access(). Fix escape
sequence warning in migration 0005.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-01-21 02:37:45 -04:00
Roberto Rosario
2e5d05403a Update linking app
Add keyword arguments. Update URL parameters to the '_id' form.
Movernize tests and update them to use the latest test case
improvements.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-01-21 02:00:22 -04:00
Roberto Rosario
c0b34067ef Update document parsing app
Update URL parameters to the "_id" forms. Add keyword arguments.
Remove use of is_path in the DOCUMENT_PARSING_PDFTOTEXT_PATH
setting.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-01-21 00:31:06 -04:00
Roberto Rosario
fc29309f68 Update Django GPG app
Add keyword arguments to all calls. Rename URL parameters to be
explicit ("key_id"). Add key delete view test. Update tests
to use a mixin for repeated key creation code. Grant permissions
and access the proper way using self.grant_permission and
self.grant_access.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-01-20 18:08:47 -04:00
Roberto Rosario
14fd5f02a8 Remove unused code from events app
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-01-19 04:22:27 -04:00
Roberto Rosario
622972fd85 Update file metadata app
Add keyword arguments to links and test views.

Update URL parameters to use the _id form.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-01-19 04:21:28 -04:00
Roberto Rosario
6376445cc4 Update document comments app
Add keyword arguments to the app links.

Remove use of `raise_404`.

Update URL parameters to use document_id and comment_id.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-01-19 04:08:45 -04:00
Roberto Rosario
53f3261dae Fix keyword argument name
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-01-19 03:56:56 -04:00
Roberto Rosario
79742e82f9 Add missing logger instance
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-01-19 01:21:26 -04:00
Roberto Rosario
3f97bc1a68 Update ContentTypeSerializer URL arguments
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-01-19 01:21:04 -04:00
Roberto Rosario
a15f0b7641 Improve FilteredSelectionForm
Improve the configuration process of the FilteredSelectionForm form
by adding Meta child class support. The child Meta class
is defined in FilteredSelectionFormOptions.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-01-19 01:20:18 -04:00
Roberto Rosario
383d0fcc38 Remove support for raising 404
Remove explict support for raising 404 error when the
object access fails.

The new method to use is to restrict the queryset using
the .restrict_queryset manager method and then .get() the
desired object. If the object access control failed then
the desired object will not be found in the queryset
and an error 404 will be raised. The end result is the same:
error 404, the method to raise the error is what differs now.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-01-19 01:12:39 -04:00
Roberto Rosario
7c4ae1aef0 Update common app API to viewsets
Update the API entries for content types and templates to use
viewsets and the new api_router_entries URL registraion
method.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-01-19 01:04:59 -04:00
Roberto Rosario
16d8fb9fea Modernize MOTD app
Update API code to use viewsets. Update links and URLs to use
keyword arguments.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-01-19 01:00:58 -04:00
Roberto Rosario
9ed93b54af Add get_related_field utility function
Add the get_related_field function to resolve a
model's related field reference by a path separate
by Django's default field separator '__'.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-01-19 00:15:56 -04:00
Roberto Rosario
2d9aca55c5 Add a central module to define project warnings
Add the mayan.apps.common.warnings module with an
initial InterfaceWarning warning class used to mark
use of deprecated internal interfaces.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-01-19 00:10:40 -04:00
Roberto Rosario
354ea434ae Add keyword arguments to the ACLs app code
Rename all instance of `pk` or `acl_pk` to `acl_id`
to match the preferred URL parameter naming conventions of
using `id` instead of `pk`.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-01-19 00:09:09 -04:00
Roberto Rosario
5d7f810477 Refactor the access control computation
Rewrite the ACL queryset filtering to move most of the
computation to the database manager view the ORM.

Add support for cascading access control checking.

Update the .check_access() method to work as a front
end of the new .restrict_queryset method. The workflow
for access control now follow Django convention of
first generating a queryset and then attempt to .get()
the desired element of the queryset.

This update also allows restricting a queryset by related
fields which can be Generic Foreign Keys.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-01-19 00:05:21 -04:00
Roberto Rosario
b53c026877 Sort arguments and imports
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-01-14 00:03:26 -04:00
Roberto Rosario
097ac7dae6 Move permission purge code
Move the code to purge obsolete permissions from the management
command to the StoredPermission default manager.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-01-13 23:58:08 -04:00
Roberto Rosario
0e800dc314 Use keyword arguments in the permissions app
Additionall rename the views GroupRoleMembersView,
SetupRoleMembersView, SetupRolePermissionsView to
GroupRolesView, RoleGroupsView, RolePermissionsView.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-01-13 23:23:18 -04:00
Roberto Rosario
38d7b7cda3 Add check_permissions replacement
Add a new class method named check_user_permission.
This method is smaller as it only accepts a single permission
instead of a single or a list of permission like check_permissions
does. check_user_permission is meant to replace check_permissions.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-01-13 22:59:59 -04:00
Roberto Rosario
9d8c8f4833 Optimize permission check
Convert the user permission check from a double Python loop
to a single ORM query.

Add methods to the Role model to grant or revoke permissions.

Rename the method requester_has_this to user_has_this for clarity.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-01-13 22:57:59 -04:00
Roberto Rosario
da1d32f6cd Rename common app migration
Rename migration 0011_auto_20181229_0738 to 0012_auto_20181229_0738
to avoid conflict with an existing 0011_* migration.

Signed-off-by: Roberto Rosario <Roberto.Rosario.Gonzalez@gmail.com>
2019-01-09 13:09:39 -04:00
Roberto Rosario
8f24b2ed80 Improve Template hash calculation
Calculate the Template hash from the content actually returned.
Remove the newlines as these are irrelevant for HTML.

Signed-off-by: Roberto Rosario <Roberto.Rosario.Gonzalez@gmail.com>
2019-01-09 12:38:38 -04:00
Roberto Rosario
58e38c1ff9 Improve FilteredSelectionForm
Improve the configuration process of the FilteredSelectionForm form
by adding Meta child class support. The child Meta class
is defined in FilteredSelectionFormOptions.

Signed-off-by: Roberto Rosario <Roberto.Rosario.Gonzalez@gmail.com>
2019-01-09 12:24:09 -04:00
Roberto Rosario
65ccbd3b7b Reorganize reusable test code
Extract test views and user code into their own separate test case
mixins. Append TestCase to test case mixins with base test code
to differentiate them from test mixins with reusable view calls.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-01-03 14:49:48 -04:00
Roberto Rosario
c6aab93f98 Initial audit of the document index app
Add keyword arguments to calls. Sort methods and parameters.

Signed-off-by: Roberto Rosario <Roberto.Rosario.Gonzalez@gmail.com>
2019-01-02 22:53:52 -04:00
Roberto Rosario
b0e3b82755 Merge branch 'versions/next' of gitlab.com:mayan-edms/mayan-edms into versions/next 2019-01-02 22:52:44 -04:00
Roberto Rosario
3dc8df46b9 Initial audit of the document index app
Add keyword arguments to calls. Sort methods and parameters.

Signed-off-by: Roberto Rosario <Roberto.Rosario.Gonzalez@gmail.com>
2019-01-02 19:16:32 -04:00
Roberto Rosario
cdb29b11f9 Add keyword argument
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-01-02 14:46:41 -04:00
Roberto Rosario
924538fe48 Initial audit of the convert app
Add keyword arguments to call. Sort methods and arguments.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-01-02 14:45:48 -04:00
Roberto Rosario
125c133334 Audit common app
Add support to override settings of the FilteredSelectionForm
via subclass attributes. Add keyword arguments to calls.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-01-02 14:34:41 -04:00
Roberto Rosario
92e615ce4c Add keyword arguments to checkouts app
Add keyword arguments to calls and view parameters. Add missing icons.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-01-02 14:19:32 -04:00
Roberto Rosario
3e53ce0c43 Add keyword arguments to the cabinet app
Modernize tests. Use the FilteredSelectionForm in the view
to add new cabinets to documents. Add missing icons.
Rename some view names to be more consistent.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-01-02 13:54:58 -04:00
Roberto Rosario
39689e2a4f Cleanup autoadmin app code
Add keyword arguments. Modernize view tests by using
GenericViewCase class.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-01-02 03:46:14 -04:00
Roberto Rosario
57d0bba0fa Add keyword arguments to authentication app
Modernize view tests by using self.<method> instead of
self.client.method. Reduce repetition of reverse method with literal
view name usage.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-01-02 03:35:46 -04:00
Roberto Rosario
c332fa4538 Add keyword arguments in the appearance app
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-01-02 03:06:11 -04:00
Roberto Rosario
a77528862f Sort imports of ACLs app
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-01-02 03:05:04 -04:00
Roberto Rosario
b3a781d51a Add ContentTypeViewMixin, ExternalObjectViewMixin
Add a mixin to ease the amount of code and imports required
for views that extract the content type from URL parameters.

Improve ExternalObjectViewMixin by adding a new class attribute
"external_object_pk_url_kwargs" to mechanize URL parameter
extraction. The external_object_pk_url_kwargs maps model
attributes using during manager get or filter from URL parameters.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-01-02 02:56:19 -04:00
Roberto Rosario
da4e4d0b46 Add duplication check to SingleObjectCreateView
Add an extra step before creation of the instance to validate
for duplication. Add the error_message_duplicate class
attribute to allow customization of the error message.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-01-02 02:53:50 -04:00
Roberto Rosario
dfd548bf62 Update ACL app to compy with MERC 5 and 6
Update the entire with keyword arguments. Update the views
to comply with MERC 6 by returning error 404 on access
failure. API are untouched. Add icon to the ACL delete
button. Add additional view tests. Use the new filtered
choice form to display a select2 enabled role selection
widget. Update the ACL creation view to not redirect to an
existing ACL in case of duplication but to instead stop
and display an error with a suggestion to the user
to instead edit the existing ACL.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-01-02 02:48:19 -04:00
Roberto Rosario
86b0463a38 Update the DisableableSelectWidget widget to work
Update the class to the Django 1.11 widget interface.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-01-02 02:46:08 -04:00
Roberto Rosario
8e0a2bbdbc Move the base test ACL mixin to the ACLs app
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-01-02 02:44:50 -04:00
Roberto Rosario
2cbac826d4 Add a reusable filtered choice form
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-01-02 02:39:24 -04:00
Roberto Rosario
7f3b28aec8 Update mailer app to comply with MERCs 5 and 6
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-31 04:02:15 -04:00
Roberto Rosario
35ef8ba7b8 Update documents app to comply with MERCs 5
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-31 02:55:43 -04:00
Roberto Rosario
ccd935d752 Update tags app to comply with MERCs 5 and 6
Addionally the permission workflow is updated to work in a
reciprocal manner. In order to attach a tag, the user's role
will need the tag attach permissions for both, the document
and the tag.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-31 00:18:37 -04:00
Roberto Rosario
5365ed4fed Update status and assign number to MERCs 5 and 6
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-31 00:14:35 -04:00
Roberto Rosario
5cb674b7ab Allow external object permission via function
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-30 16:26:42 -04:00
Roberto Rosario
ffeb580c15 Add event tests to document comments app
Switch view to return an HTTP 404 on lack of authorization
instead of an HTTP 403.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-30 16:25:32 -04:00
Roberto Rosario
45ceab024d Add two new MERC proposals
Add the explicit arguments and lower information disclose MERCS.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-30 14:14:44 -04:00
Roberto Rosario
cd9d51db9e Improve document comment app
Add keyword arguments to URL definitions and reverse resolution.
Raise HTTP error 404 instead of 403 to reduce the information
divulged. Add view tests.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-30 02:26:23 -04:00
Roberto Rosario
82651ff32c Improve and fix failing metadata tests
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-29 20:43:33 -04:00
Roberto Rosario
23a4a56aae Fix failing tests
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-29 04:47:40 -04:00
Roberto Rosario
c40e0c136a Add group create and edit events
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-29 04:06:11 -04:00
Roberto Rosario
000fe87c37 Remove use of storage wrappers
Use a dynamic subclass instead that always deconstructs to a fake
subclass with a __eq__ method that always returns True. This should
trick makemigrations into never creating a new migrations for
changes to the storage class or the arguments.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-29 03:45:56 -04:00
Roberto Rosario
442bf5dc4b Wrap storages
Wrap storages directly connected to file model fields to avoid
Django triggering a migration change when an attribute of the
storage is changed, like the location.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-28 00:22:49 -04:00
Roberto Rosario
f96057b0fd Add more new icons
Add new icons for the apps: Document comments, documents, file metadata,
parsing and OCR.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-27 05:45:01 -04:00
Roberto Rosario
e687430cf0 Use new icon classes, improve URLs layouts
Use the new icon classes to add custom icons. Improve
the URL schemes of some apps for uniformity.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-27 04:46:56 -04:00
Roberto Rosario
24066c494e Better menu restore, add hover, active class
Improve the code that restores the menu state after a refresh.
Add hover styling for menu sub links. Add an active class
for the menu sub links and JavaScript to assign it to the
link clicked or restored.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-27 04:43:48 -04:00
Roberto Rosario
945eed7ad5 Add two new icon classes
Add new icon classes based on Font Awesome that support
layering, masking and combining glyphs.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-27 04:42:06 -04:00
Roberto Rosario
0ee82e9efe Add support for SourceColumn label display
Update the class to disable displaying the column label by default
and only so when the include_label argument is True.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-27 00:33:33 -04:00
Roberto Rosario
8d3f26bd7f Tweak panel highlight style
Increase the width of the border for hightlighted panels.
Add a hover shadow to selectable panels.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-26 17:30:10 -04:00
Roberto Rosario
eeceb52c06 Fix failing source tests
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-26 06:09:48 -04:00
Roberto Rosario
57269ca7f9 Improve request object resolution
Add an additional method to obtain the request when it is
not available from the context.

Add support for SourceColumn resolution of inherited
sub models.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-26 06:08:46 -04:00
Roberto Rosario
c9ce90ea31 Improve source column definitions
Update usage of SourceColumns in the sources app.
Move some colum definitions from the view to the app
module using SourceColumn instances.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-26 06:03:03 -04:00
Roberto Rosario
50ea0c15df Support list mode in staging folder source
Add no-result content to display when there are no files
in the staging folder.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-26 06:00:21 -04:00
Roberto Rosario
5a90d76005 Make list mode code its own mixin
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-26 05:59:31 -04:00
Roberto Rosario
43691de6b7 Don't override list view mode in cabinet view
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-26 05:58:53 -04:00
Roberto Rosario
fe2cf70d93 Display action dropdown only if there are links
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-26 05:58:26 -04:00
Roberto Rosario
49c9fbbce1 Remove unused file
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-26 02:40:07 -04:00
Roberto Rosario
4ff9794286 Update and move JavaScript install code
Update the JavaScript dependency installation code to handle scoped
packages. The code is also updated to use pathlib's Path.

Move the JavaScript dependency installation to its own app named
dependencies.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-26 02:15:44 -04:00
Roberto Rosario
d6c7a0d765 Update renamed template variable
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-25 04:55:55 -04:00
Roberto Rosario
5e4cbbe2bc Remove MultiItemForm
Remove the HTML based MultiItemForm and use a Bootstrap dropdown
menu for the bulk actions list.

Add a text message explaining that items must be selected in
other to activate the bulk action menu.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-25 04:53:06 -04:00
Roberto Rosario
9e4ebf4e04 New sidebar layout
Update UI code to display a fixed location sidebar. The sidebar is
also of a fixed width instead of being a certain number columns
wide. The action dropdown is also now in a fixed location.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-25 03:39:22 -04:00
Roberto Rosario
bd194a70cb Add spaceless tags
Add spaceless tags to the invalid document template.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-24 19:18:54 -04:00
Roberto Rosario
6dcd8bd9aa Add a template list API view
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-24 19:18:36 -04:00
Roberto Rosario
2c3e2e2bef Shorten and reorganize menu names
Change the left hand side menu designation to be the 'main'
menu from 'sidebar', the menu at the top goes from 'main'
to 'topside'. All menus are referenced by their name only
and the fragment 'menu' is dropped from all as it is obvious
that they are menus and the Menu class doesn't supply any
other kind of object.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-24 19:15:20 -04:00
Roberto Rosario
2402668e16 Restore the side bar menu state after a refresh
Add code to detect the current URL and open the parent of
the menu entry that correlates to it.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-24 18:51:53 -04:00
Roberto Rosario
38228b4fe8 Control the height of thumbnails in table view
Since tables row height can't be controlled using CSS (they
will always resize to the size of their elements), this commit
adds a table cell container whose size can be controlled from
the view. This way big thumbnail images won't break the appearance
of the table.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-24 14:29:14 -04:00
Roberto Rosario
91465ef9b0 PEP8 cleanup
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-24 04:31:20 -04:00
Roberto Rosario
ff24e17eb6 Expose Separator and Text for easier imports
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-24 04:26:05 -04:00
Roberto Rosario
d687e62106 Unify and remove events view and widgets
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-24 04:25:35 -04:00
Roberto Rosario
15bec5fcdb Add/Remove: Enable double click, add help text
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-24 04:23:41 -04:00
Roberto Rosario
9be8f02829 Make sure the ChoiceForm is full height
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-24 04:23:06 -04:00
Roberto Rosario
fd7e937cef Move current user views and add user events
Move the current user detail and edit views from the common app
to the user_management app. Add the user created and edited events.
Add an user detail view.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-24 04:21:25 -04:00
Roberto Rosario
931b17a447 Display facets and object list facet links
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-24 04:15:23 -04:00
Roberto Rosario
32fb40548a Display resolved attribute URL or fallback
Update template code to display the resolved attribute's absolute_url
and if it doesn't provide it, fallback to display the main object's
absolute_url.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-24 04:12:39 -04:00
Roberto Rosario
b848737515 Render the resolve attribute not the literal
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-24 02:45:05 -04:00
Roberto Rosario
4a0e9ffa15 Remove document_link widget
The SourceColumn class has now the ability to render a link's
absolute_url, turn this on for the document parsing error and
OCR error list columns and remove the document_link widget.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-24 02:43:26 -04:00
Roberto Rosario
ae22e0f70c Common: Small system menu fixes
Add a separator under the setup link in the system menu.
Fix the user menu separator which is at the top of the username
and should be udner it.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-24 01:36:20 -04:00
Roberto Rosario
012c027994 Events: Improve and merge views
Merge the current user event, the user events and the object events
views.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-24 01:34:42 -04:00
Roberto Rosario
c1c8d1dc2d Converter: Add transformation edit view tests
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-23 21:28:05 -04:00
Roberto Rosario
25edc73100 Add support for sortable columns
Add a new argument to the SourceColumn class to flag a column as
sortable. The SourceColum will generate a request querystring to
be used as the table header archor href. The SingleObjectListView
will capture the querystring and call the order_by on the queryset
to sort it.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-23 05:11:14 -04:00
Roberto Rosario
36101dfea6 Documents: Improve slice of recent document list
Improve the method of slicing the document list to produce
a queryset that can be further sorted.

Add a new date added column to the recently added document list.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-23 02:04:54 -04:00
Roberto Rosario
28cc228b5a Apperance: Remove obsolete variables and a filter
Remove the variable multi_select_item_properties and the
get_encoded_parameter custom filter.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-23 02:02:07 -04:00
Roberto Rosario
64e1c6bb67 Add widget support to SourceColumn
Allow passing a widget class to SourceColumn. This makes
using lambdas to render model column unnecesary and are
mostly removed too.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-22 05:35:31 -04:00
Roberto Rosario
360e756093 Disable user groups link if superuser or staff
Disable the link to view an user's (or current user)
group list if the user is a superuser or staff.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-22 02:04:46 -04:00
Roberto Rosario
b79c168dab SourceColumn label optimization
Compute the SourceColumn at definition instead of doing it
during the resolve method. This move the label calculation
from the rendering to the startup.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-21 23:53:17 -04:00
Roberto Rosario
14f31d5614 Add new list templates toolbar
Add the new generic list and generic list items toolbar which allow
switching the list display mode.

This toolbar also includes a stylized button to select and deselect
all items emulating the check-all checkbox.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-21 23:51:20 -04:00
Roberto Rosario
9784798118 Tweak the vertical spacing of the viewport
Update the CSS to prefer a margin to the current padding.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-21 23:49:24 -04:00
Roberto Rosario
8ca6c563bc Update the invalid document template
Update the invalid document template to use the new font awesome
defitions.

Increase the size of the default template.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-21 23:48:26 -04:00
Roberto Rosario
213f3c1fb4 Cleanup SourceColumn invocations
Update the code of some SourceColumn invocations to be model methods
instead of lambda wapped functions.

Move the translated labels to the models too.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-21 23:47:14 -04:00
Roberto Rosario
5623f0b3a4 Improve the server error template appearance
Add a red alert for faster visual scanning. Place the
status code output in the same line as the initial message to
save some vertical space for debug output.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-21 23:44:19 -04:00
Roberto Rosario
79cba7abe1 Improve the resolve_attribute function
Update the arguments of the function to be full length and more explicit.
Use exceptions to find the correct way of using the attribute of the
object passed instead of trying to use introspection.
Add support for passing key word arguments to the attribute being
resolved even if it is a class method.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-21 23:41:38 -04:00
Roberto Rosario
9bcaf1849b Appearance: Update fontawesome version
Update fontawesome to version 5.6.3 and install it via NPM.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-21 20:03:44 -04:00
Roberto Rosario
c2fc10c344 Highlight selected panels
Add event handler and style sheet to highlight panels when selected.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-20 20:54:54 -04:00
Roberto Rosario
263d646c7c Appearance: Select card by clicking on the card
Add support for selecting a document from the UI by just clicking
on the title of the body of the card, not just on the checkbox
next to the title.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-20 20:40:26 -04:00
Roberto Rosario
bd54877e0c Add missing file
An __init__.py file was missing from commit
76853147c8.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-20 16:47:52 -04:00
Roberto Rosario
60ac63ead4 Add new sidebar main menu
Add a left side menu navigation style. The main app navigation links
will be displayed here. The notification, user and system tools are now
displayed at the top navigation bar.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-20 16:47:02 -04:00
Roberto Rosario
f77f64cc71 Source: Change source test behavior
Update sourcs to accept a test argument to their check methods.
This is to allow for explicit test behavior like running the
check method code even when the source is disabled and to
not deleted downloaded content during a test.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-18 17:27:40 -04:00
Roberto Rosario
7672aca7a9 Add button widget for forms
This widget will allow displaying HTML anchor buttons inside
the forms. It uses by default the navigation instance template
from the navigation app.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-18 17:21:21 -04:00
Roberto Rosario
76853147c8 Split sources models into separate modules
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-18 03:23:23 -04:00
Roberto Rosario
f71ca8f2f5 Split sources models into separate modules
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-18 03:22:26 -04:00
Roberto Rosario
ba48a7e0fd Initial implementation of mailer events
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-16 04:15:31 -04:00
Roberto Rosario
798446f362 Add klass argument to get_object_or_404 usage
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-16 01:55:33 -04:00
Roberto Rosario
727d2ecd71 Convert the title calculation into a template tag
Convert the calculate form title template into a template tag.
The result of the template tag is applied as the title property
of the <H3> HTML tag allowing users to view the full title on
mouse hover if the title was truncated.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-16 01:09:32 -04:00
Roberto Rosario
3a6a250d1b Move dashboard code to its own app
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-16 00:34:21 -04:00
Roberto Rosario
6ed18926cc Move appearance templates to their apps
Move the authenticaton and navigation templates to their respective
apps.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-16 00:14:15 -04:00
Roberto Rosario
c2f10fd38d Styling: Unify styling of signal handlers
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-15 23:57:33 -04:00
Roberto Rosario
1d1600c5dd Improve the partial navigation error reporting
Add a HTTP status code display. If status code is 0 assume
there is a communication error and display such.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-15 21:02:54 -04:00
Roberto Rosario
b83ab1b528 Improve how settings are loaded from config file
Update the way settings are loaded. Instead of loading the
entire config file now settings are loaded from the config
file on demand when the cache misses.

Improve the smart settings classes tests and add another test
for the config file loading.

Add support for variable config file path.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-15 21:00:51 -04:00
Roberto Rosario
8559565dca Signatures: No terminal raises NeedPassphrase
Update the Key model's sign_file method to raise the NeedPassphrase
exception when GPG has no terminal available and not just when the
GPG backend specifically asks for a passphrase.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-15 15:27:26 -04:00
Roberto Rosario
77468a87be Tests: Fix failing tests after last refactor
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-15 15:26:19 -04:00
Roberto Rosario
0e86f2ad8a Refactor the model accesors
Refactor the accesors to behave like methods instead of properties.
This means all accesors will be prepended with the string
"get_" and will include a set of parenthesis.

Improve the ModeAttribute class to use the method's
short_description. This commit also adds support for a
new method .help_text attribute has been added.

Move accessors to their own module, named "methods.py".

Remove the PropertyHelper class as the accessors no longer
need it.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-15 04:49:40 -04:00
Roberto Rosario
8c63ef4c69 Styling: PermissionNamespace keyword arguments
Add keyword arguments to all called instances of PermissionNamespace.
Sort name and label arguments.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-14 21:58:38 -04:00
Roberto Rosario
3adb9d4ea0 Sort method arguments
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-14 18:08:44 -04:00
Roberto Rosario
4d46ca3343 Unify document type selection forms
Merge all document type selection forms into a single smarter form
that can perform permission filtering and allow single or multiple
selections.

This commit also add the document type selection for submit
view to the file metadata app.

This commit also updates the document type selection views
for the OCR, document parsing, and upload wizard to use
the new document type selection form and removes their
respective document type selection forms.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-14 18:06:23 -04:00
Roberto Rosario
315e70309b Documents: Split monolith forms.py
Split the documents/forms.py into sub modules for each logical
unit: types, document, pages, versions.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-14 15:44:25 -04:00
Roberto Rosario
34443a715c Tests: Remove unused override_settings
Now that the automatic OCR, parsing and file metadata processing
are turned off by the test setting file, these overrides in the
tests are not needed anymore.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-14 03:12:42 -04:00
Roberto Rosario
46c2192d9a Mirroring: Fix failing tests
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-14 02:54:54 -04:00
Roberto Rosario
108744cdd5 Styling: Remove extra semicolon from line
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-14 02:45:52 -04:00
Roberto Rosario
15180e95bf Styling: Add keyword arguments to add_to_class usage
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-14 02:44:50 -04:00
Roberto Rosario
503af584d5 Migrations: Remove superfluous code comments
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-14 02:35:24 -04:00
Roberto Rosario
b28281be5a Tests: Turn on parsing and OCR
The base test file now turns off OCR, parsing and file metadata
processing. Apps that rely on those must now turn them on
explicitly.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-14 02:24:56 -04:00
Roberto Rosario
feb92a105f Add exiftool to documentation and the Dockerfile
This binary is required by the new file metadata app.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-14 02:24:06 -04:00
Roberto Rosario
0a7908baca File metadata: Add file metadata app
Add the file metadata app. This app uses binary wrappers called drivers
to extract properties from the file of documents. The default driver
uses the exiftool to extract the EXIF record from JPEG images.
The exiftool can also extra some properties from other files like
PDFs, office files and sound file.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-14 02:16:38 -04:00
Roberto Rosario
1efec6bd41 Navigation: Related field support to SourceColumn
Add support to the SourceColumn class to resolve related fields
using the double underscore as separator. Columns that use related
no longer have to use throw away lambdas.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-14 02:15:49 -04:00
Roberto Rosario
68995adb7f AJAX: Improve error display during debugging
Add message body display when the Django debug flag is True.
Add a CSS to simulate the appearence and legibility of the
debug message.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-13 00:21:35 -04:00
Roberto Rosario
2b52ee11b2 Documents: Fix typo in UUID field help text
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-12 23:20:33 -04:00
Roberto Rosario
5d944b922f Appearance: Remove markup and reuse template
Remove markup in the base.html template to render the Actions dropdown
and use instead the built in navigation/generic_navigation.html
template.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-12 23:19:04 -04:00
Roberto Rosario
ae2205fe30 Documents, Signatures: Add icons
Add icons to document version action links. Add icons to
detached and embedded signing action links.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-12 23:18:04 -04:00
Roberto Rosario
84e78f16d9 Appearance: Remove fadeIn animation
Remove the fade in animation in document thumbnails. Tweak
the match height refresh interval to reduce scrollbar
jitter in Firefox. Change the fancybox display animation from
zoom to fade in.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-12 23:14:43 -04:00
Roberto Rosario
e83f6e55a0 Permission: Permission reference to property
Convert the volatile permission reference in the stored permission
model from a method to a property to allow future caching optimization.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-12 23:12:52 -04:00
Roberto Rosario
bc816ccdda OCR: Turn off parsing in OCR tests properly
The document parsing was being turned off in the OCR tests
by setting the binary to an invalid value. A proper way
to disable automatic parsing was added in a previous commit
and this commit updates the test case class to use that method.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-12 21:06:58 -04:00
Roberto Rosario
c7dec2ee09 Documents: Add missing migration for model rename
Add the migration for the DocumentPageResult model rename in
commit 2d4a710999.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-12 21:05:50 -04:00
Roberto Rosario
f8c25af796 Tests: Modernize some test cases
Update some view tests in the tags, sources and linking apps
to use the test case classes provided by the common app.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-09 17:10:27 -04:00
Roberto Rosario
e048f31f85 Workflows: Use full path reference to tags widget
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-09 15:10:41 -04:00
Roberto Rosario
278fdc3c9a Workflows: Don't capture form exceptions
Instead of capturing the form save exceptions in the subclass
let the base class do the work.

Use the base class get_instance_extra_data method to avoid
some code repetition.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-09 15:04:05 -04:00
Roberto Rosario
6832450221 Generic forms: Don't raise, display exceptions
Update the generic single object create and edit views to display
critical exceptions instead of just raising them and stoping
execution. The should allow removing duplicated exception to message
code in subclasses of these views.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-09 14:59:59 -04:00
Roberto Rosario
e699e39c37 Celery: Remove use of autoretry_for and retry_backoff
These features were for Celery 4.2.1, since this version
has a regression, version 4.1.1 is used instead.
The version 4.2.1 features are removed also and implemented
in code.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-09 01:31:56 -04:00
Roberto Rosario
55e9b2263c Celery: Update Celery to version 4.1.1
Upgrade Celery version used from 3.1.26 to 4.1.1. The following
settings have been renamed: CELERY_ALWAYS_EAGER to
CELERY_TASK_ALWAYS_EAGER, BROKER_URL to CELERY_BROKER_URL.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-08 22:49:15 -04:00
Roberto Rosario
034e0668f4 Caching: Remove caching migration from common app
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-08 17:07:24 -04:00
Roberto Rosario
da6d7cbc0c Converter: Sort ConverterBase methods
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-08 16:34:34 -04:00
Roberto Rosario
2f3d640799 Convert: Move initalization of Pillow
Pillow was being initialized on import. This commit
moves the initialization to the __init__ method of the
Python backend subclass.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-08 16:33:35 -04:00
Roberto Rosario
fad2ae3683 Migrations: Squash migrations
Squash together the following migrations:

  - Common: 0010 to 0011
  - Documents: 0029 to 0037
  - Documents: 0042 to 0043
  - Tags: 0001 to 0008

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-08 03:02:04 -04:00
Roberto Rosario
aaea84b386 Caching: Turn the new caching into its own app
Extract the new smart file caching code from the common app
and convert it into its own new app called file_caching.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-08 01:38:59 -04:00
Roberto Rosario
0c7f9f50af Tests: Mute database convertion tests output
Mute the root mixin to mute all the database conversion tests.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-07 21:16:07 -04:00
Roberto Rosario
f744eb8871 Documents: Split document.models module
Split the .model module from the document app into separate
modules by purpose. The new modules containing the documents
app models are: document_models.py, document_page_models.py,
document_type_models.py, and document_version_models.py.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-07 21:11:34 -04:00
Roberto Rosario
3ae991c9cd Style: Minor PEP8 code cleanups
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-07 20:24:18 -04:00
Roberto Rosario
60233e0b89 Merge branch 'features/explicit_app_paths' into versions/next
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-07 20:17:45 -04:00
Roberto Rosario
50e72fdb4e Style: Move document model functions
Move the document UUID and document hash functions
to the documents.utils module.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-07 18:08:47 -04:00
Roberto Rosario
255b1c75ea Style: Prepend "operation_" to data migrations
Prepend "operation_" to the data migration functions
for clear purpose. Add keyword arguments to the RunPython
migration opration.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-07 17:28:22 -04:00
Roberto Rosario
ab1482152e Documents, Mailer: Sort imports, minor style fix
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-07 17:20:00 -04:00
Roberto Rosario
adab93fad6 Development: Add a default isort configuration
Add a config file for isort that most closely approaches Mayan's
best practices.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-07 16:09:14 -04:00
Roberto Rosario
99a1d143ee Tests: Silence expected debug output during tests
Several tests cause errors on purpose to test behaviors.
This commit mute these tests setting their debug level
to critical or by using a context manager to null their
stdout descriptor.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-07 16:06:53 -04:00
Roberto Rosario
28f387cf6c Metadata: Use generator to prepare lookup choices
Change the use of the list/zip combinarion to generate
the full list of metadata lookup choices to a generator.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-07 03:34:02 -04:00
Roberto Rosario
8039dfa30a Autoadmin: Incorporate the autoadmin app
Incorporate the external django-autoadmin app as a core app
and convert it into a Mayan app. This change adds the new
settings: "COMMON_AUTOADMIN_EMAIL", "AUTOADMIN_PASSWORD", and
"AUTOADMIN_USERNAME".

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-07 03:09:59 -04:00
Roberto Rosario
28a1ecb685 Events: Display current user events
Add a new view to display the events of the current user.
The link to this view is added to the user menu in the main menu
bar.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-06 22:01:41 -04:00
Roberto Rosario
3ab41e6b63 Events: Update subscription icon
Update the subscription icon to match other instances.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-06 22:00:28 -04:00
Roberto Rosario
46cd7353dc Multiple apps: Sort imports and minor style fixes
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-06 16:38:24 -04:00
Roberto Rosario
4d84b5f28f Common app: Move HOME_VIEW setting
The HOME_VIEW setting is not a Django setting but a setting from the
common app. Move the HOME_VIEW to the COMMON namespace and rename it
to COMMON_HOME_VIEW.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-06 15:58:19 -04:00
Roberto Rosario
0d9bda0ccf Merge branch 'features/explicit_app_paths' of gitlab.com:mayan-edms/mayan-edms into features/explicit_app_paths 2018-12-06 05:09:54 -04:00
Roberto Rosario
dc255da362 Multiple apps: Default binary path by platform
Use Python's platform library to detect the operating system and
use different default paths for the binary dependencies.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-06 05:08:35 -04:00
Roberto Rosario
ef126d56b2 Documents: Allow version upload task stubs access
Update which Document model manager the new version upload task
uses to fetch the document. Changing to the passthrough manager
allows the task to access document stubs which is the expected
behavior as new document with no versions are considered stubs.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-06 03:04:53 -04:00
Roberto Rosario
d6435b7735 Django GPG: 3rd party app compatibility update
Update the django_gpg app to work with the latest version of the
python-gnupg package (0.4.3).

The python-gnupg now returns a more clear error message to
differentiate between a bad passphrase and a missing passphrase.
This improments allows the django_gpg to simplify its error
message parsing and remove the literals:
"ERROR_MSG_NEED_PASSPHRASE" and "ERROR_MSG_GOOD_PASSPHRASE".

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-06 02:58:40 -04:00
Roberto Rosario
d1a4cb875b Document signatures: Rename settings
Rename the setting "SIGNATURES_STORAGE_BACKEND" to
"DOCUMENT_SIGNATURES_STORAGE_BACKEND" and the setting
"SIGNATURES_STORAGE_BACKEND_ARGUMENTS" to
"DOCUMENT_SIGNATURES_STORAGE_BACKEND_ARGUMENTS". This is
to differentiate these from the settings of the django_gpg
app.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-06 02:37:25 -04:00
Roberto Rosario
8d8ec59e03 Django GPG: Setting options changes
Remove the SIGNATURES_GPG_HOME settings. The GPG keys are no longer
stored in disk but in the database itself making this setting obsolete.
This changed happened several versions ago and this removal doesn't affect
any code path.

Add two new settings to the app: SIGNATURES_GPG_BACKEND and
SIGNATURES_GPG_BACKEND_ARGUMENTS. These settings allow changing the
GPG backend that the app will use.

Remove the settings SIGNATURES_GPG_PATH. The path to the GPG binary
is now passed via the SIGNATURES_GPG_BACKEND_ARGUMENTS.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-06 02:34:15 -04:00
Roberto Rosario
55a30379bd Various apps: Sort imports
Run imports as per Mayan EDMS best practices.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-06 01:57:24 -04:00
Roberto Rosario
8740707d1d Documentation: Minor edit in the releases text
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-12-06 00:48:05 -04:00
Roberto Rosario
27c04ed9be Converter: Remove base64 image support
The get_page method had support to return the image in
base64 format. This feature is no longer used by any
other app.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-05 14:47:12 -04:00
Roberto Rosario
fd4c2e7f00 Converter: Remove base64 image support
The get_page method had support to return the image in
base64 format. This feature is no longer used by any
other app.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-05 14:45:20 -04:00
Roberto Rosario
685d9b6d3e Converter: Replace deprecated string_concat
Change the use of string_concat with format_lazy.
string_concat is deprecated in Django 1.11 and removed in
Django 2.1.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-12-05 04:48:31 -04:00
Roberto Rosario
c430d471e6 Setting: Improve type checking
Update the type checking from using Django's six port
to use direct list and tuple instance checking.

Needed for Python 3.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-12-05 04:43:47 -04:00
Roberto Rosario
8aeb7f01fe Converter: Fix failing tests
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-12-05 04:43:20 -04:00
Roberto Rosario
d1945b6190 OCR: Update app to use document image cache
Update the OCR app to use the document image cache instead
of trying to read the image file directly from
the document storage.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-12-05 04:35:12 -04:00
Roberto Rosario
c466c44dfb Search: Fix failing tests
The SearchModel class no longer returns an elapsed time
value. Update the tests and views that expect this removed
variable.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-12-05 03:19:27 -04:00
Roberto Rosario
55cd928069 Documents: Add default filtering of stubs
Add filter(is_stub) to the default Document model manager.

Now only the Passthrough manager can access document stubs.

Remove the explicit filtering of stubs from code that obtains
the queryset from the default document manager.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-12-05 03:05:39 -04:00
Roberto Rosario
f6a675c9db Documents: Decrease thumbnail fadein duration
Reduce the document thumbnail fadein animation length
to speed up display of resolved thumbnails.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-12-05 02:49:29 -04:00
Roberto Rosario
2d4a710999 Document: Rename DocumentPageResult model
Rename the DocumentPageResult to DocumentPageSearchResult for
clarity of purpose.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-12-05 02:48:34 -04:00
Roberto Rosario
f9dfc00b30 Project: Fix partial references to apps
All apps references now need to be prepended with mayan.apps.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-12-05 02:19:36 -04:00
Roberto Rosario
2379f6963f Common: Add colorized log formatter
New log formatter that color the output depending on the log
level of the message. The default palette handles: INFO,
SUCCESS, ERROR, DEBUG and CRITICAL.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-12-05 02:12:32 -04:00
Roberto Rosario
59fbbd82e2 Common: Add colorized log formatter
New log formatter that color the output depending on the log
level of the message. The default palette handles: INFO,
SUCCESS, ERROR, DEBUG and CRITICAL.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-12-05 02:07:34 -04:00
Roberto Rosario
8e69178e07 Project: Switch to full app paths
Instead of inserting the path of the apps into the Python app,
the apps are now referenced by their full import path.

This app name claves with external or native Python libraries.
Example: Mayan statistics app vs. Python new statistics library.

Every app reference is now prepended with 'mayan.apps'.

Existing config.yml files need to be updated manually.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-12-05 02:04:20 -04:00
Roberto Rosario
146ebb7032 Documents: Update cache size on setting update
Add a setting callback to update the size of the document
cache when the DOCUMENTS_CACHE_MAXIMUM_SIZE setting is
updated.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-12-04 15:48:44 -04:00
Roberto Rosario
1515c0170f Cache: Prune the cache on property updates
Execute the prune method of a cache when its properties
are changed. This ensures the size of the cache matches
the maximum size set when last saved.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-12-04 15:46:05 -04:00
Roberto Rosario
984a1903ce Settings: Add support for post edit callbacks
Settings can be provided with a function via the new
"post_edit_function" argument. This function will be called
when the setting's value is updated. The function will only
receive one argument: The instance of the setting being
changed.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-12-04 15:44:08 -04:00
Roberto Rosario
f4e0e06c66 Documents: Remove old image caching model
With the creation of the new general use file Cache system
the old DocumentPageCachedImage model and manager are no longer
needed. This commit removed the model and the manager, and add
a migration to remove any data in the model before removing it
from the database.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-12-04 15:21:57 -04:00
Roberto Rosario
66b04296f5 Documentation: Update release notes and changelog
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-12-04 00:11:58 -04:00
Roberto Rosario
d6394c5e3b List template: Add missing closing tag
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-12-04 00:05:28 -04:00
Roberto Rosario
396f9f6fca Search: Refactor classes
Add additional classes to split existing classes that are too complex.

Remove search timming.

Add query explainer.

Move literals to their own module.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-12-04 00:04:41 -04:00
Roberto Rosario
1d1b4f5f5f Documents: Organize methods per best practices
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-12-04 00:00:42 -04:00
Roberto Rosario
89d3fb9922 Cache: Beta stage
Add retry to race condition in intermediate image generation.

Remove DB index from cache file size field.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-12-03 04:26:00 -04:00
Roberto Rosario
77fc9b5831 Caching: MVP stage
Working implementation with three levels of organization per cache.
Cache -> Partition -> File.

Current non blocking lock for the intermediate file generation needs
to be replaced to a blocking lock.

Needs tests.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-12-02 05:00:35 -04:00
Roberto Rosario
a414b8df92 Caching: Initial experitmental cache model
signed-off-by: Roberto Rosario <rosarior@t60.lan>
2018-11-30 19:48:26 -04:00
Roberto Rosario
f25174bd15 Configuration: Sane empty result
The settings/base.py file is expeting a dictionary of configuration
options. If there is no config.yml, return and empty dictionary
instead of a None result.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-11-30 14:55:00 -04:00
Roberto Rosario
7a4d230195 Appearance: Don't hide icons on small screens
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-11-30 04:36:11 -04:00
Roberto Rosario
d210f05aa6 Appearance: Homogenize the no-result template look
Make sure the no-result template looks the same when included from
all the parent templates.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-11-30 04:35:54 -04:00
Roberto Rosario
8bf484051e Documents: Delay error handler
Add a delay to the image error handler attachment code to avoid
triggering a false image error event. This is cause when the error
handler is attached before the image is assigned a src attribute.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-11-30 04:31:59 -04:00
Roberto Rosario
ab045c499c Indexing: Update the default index
Update the default date-based index for the new Jinja2
template language.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-11-30 04:30:38 -04:00
Roberto Rosario
abfc8b0c09 Navigation: Add list facet menu
Add the new list facet navigation menu. Used to provide facets
to the list subtemplate. The list facet allows separating the object
action links from the object navigation links. The list facet
links are displayed before the list object links on the list
subtemplate. In the object views, the list facet menu behaves
exactly the same as the form facet menu.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-11-29 04:17:53 -04:00
Roberto Rosario
52bbf62e26 Documents: PEP8 and code style cleanups
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-11-29 02:11:26 -04:00
Roberto Rosario
e0d900d952 Workflows: Refactor workflow preview generation
Refactor the workflow preview generation to work as a
background task API service. Solves GitLab issue #532.

The image generation runs as an out of process task
ensuring that the HTTP request is never compromised.

A new task queue named "document_states_fast" was created.
The settings WORKFLOWS_IMAGE_CACHE_TIME,
WORKFLOWS_IMAGE_CACHE_STORAGE_BACKEND,
WORKFLOWS_IMAGE_CACHE_STORAGE_BACKEND_ARGUMENTS we added.

Images generated are stored by default under /mayan/media/workflows.

The Dockerfile and deployment instructions are updated
to include the new queue.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-11-29 02:10:31 -04:00
Roberto Rosario
cfe1934b9b Appearance: Fix form CSS media rendering
Fix the way the form CSS contained in the media attribute
is rendered. This is now an interator and not a single value.
Replace the current method with a for loop.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-11-29 01:12:36 -04:00
Roberto Rosario
ef3453b48c Documentation: Fix error in example setting
The example MAYAN_DATABASES setting was missing the 'default'
database key.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-11-28 15:15:39 -04:00
Roberto Rosario
2bd649ab52 Documentation: Add install troubleshooting
Add section to outline common pitfalls when installing.
Reference GitLab issue #487.

Update installation instructons to use the setting
MAYAN_DATABASES instead of the old MAYAN_DATABASE_*.

Unify the installation instructions by converting the
chapters into partials that are now included in the
topic file.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-11-28 05:09:49 -04:00
Roberto Rosario
13524f5ce0 Documentation: Update watch folder description
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-11-28 04:14:33 -04:00
Roberto Rosario
c6104e0080 Mirroring: Increase cache timeouts
Increase the default value of the index mirroring cache timeout
from 10 seconds to 5 minutes. Since version 3.1.5, mirror
cache invalidation is tied to index updates. This makes the
timeout less relevant. The purpose of the cache timeout is
now avoid runaway memory usage.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-11-28 04:13:48 -04:00
Roberto Rosario
f9a0fb2e79 Watch folders: Add support for subfolders
Add support for subfolder scanning to watch folders. Closes
GitLab issue #498.

This commit adds a new field to watch folders called
"include_subdirectories".

The directory walk was also updated to use pathlib2.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-11-28 04:00:15 -04:00
Roberto Rosario
d973a20c30 Mailing: Add support for a from field
Add support to the mailing profiles for specifying a "from"
address. Closes GitLab issue #522.

This commit adds a new backend class property "class_fields"
which differs from the normal "fields" property. The "class_fields"
property specifies which of the backend fields will be used to
initialize a backend's driver class. This is to avoid passing
fields that the driver doesn't expect and getting an error.

When sending emails, the "send" method will attempt to get
a "from" key from the backend data and use that when sending
emails. If no "from" key is found a None is passes. Django's
behavior in this situation dictates that the "from" value will
then be taken from the DEFAULT_FROM_EMAIL setting.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-11-28 02:59:12 -04:00
Roberto Rosario
b8b10592c7 Mailing: Display a message when testing
A success or failure message will be now displayed when
testing a mailing profile.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-11-28 02:57:23 -04:00
Roberto Rosario
96ee283226 Documentation: Improve app chapter formatting
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-11-28 00:36:42 -04:00
Roberto Rosario
0188737e74 Settings: Delay initialization of setting
Delay the usage and initialization of Django settings
by removing their reference from the "save_configuration"
method declaration.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-11-28 00:35:05 -04:00
Roberto Rosario
46bd5b0a17 Documentation: Improve versioning section
Fix formatting of the versioning section
and turn the list of version examples into a table.
Add further examples for minor and micro releases.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-11-28 00:33:42 -04:00
Roberto Rosario
10ccab662f Password validations: Add two new validators
Add two new custom password validators. One ensures
passwords have a minimum number of uppercase letters and the
other ensures passwords have a minimum amount of numbers.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-11-27 20:07:18 -04:00
Roberto Rosario
77dc53f244 Documentation: Add mention to DEFAULT_FROM_EMAIL
Add mention and example of this new settings option
that is now available.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-11-27 20:05:27 -04:00
Roberto Rosario
21d7ec2428 Documentation: Cleanup and code documentation
Cleanup the Sphinx configuration file to comply with PEP8.

Enable the viewcode and autodoc extensions to start adding
code snippets in code.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-11-27 20:04:50 -04:00
Roberto Rosario
2ca38c20b0 Tests: Fix failing tests
Fix failing tests in the OCR and parsing apps.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-11-27 17:17:07 -04:00
Roberto Rosario
67e79d0e19 OCR, Parsing: Revert iterator stop
Revert how the OCR and document parsing generators end
their iteration. Originally they issue an empty return,
then a blank yield was added. This commit reverts the
blank yield and restores the original 'return' behavior.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-11-27 17:15:38 -04:00
Roberto Rosario
141d79afa6 Documentation: Add initial 3.2 release notes file
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-11-27 05:31:18 -04:00
Roberto Rosario
e9411514c7 PEP8: Code cleanup
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-11-27 05:28:55 -04:00
Roberto Rosario
2f70a57f18 Documentation: Update OCR and parsing indexing examples
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-11-27 05:27:01 -04:00
Roberto Rosario
5a626861ae Parsing: Add the 'content' attribute
Add the 'content' attribute to documents to allow access
to a document's parsed content for indexing and other purposes.

Fixes the document parsing indexing failing test.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-11-27 05:24:55 -04:00
Roberto Rosario
aaf9f7a8be OCR: Add 'ocr_content' attribute
Add the 'ocr_content' attribute to documents to allow access
to a document's OCR content for indexing and other purposes.

Fixes the OCR indexing failing test.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-11-27 05:20:31 -04:00
Roberto Rosario
0f5625a356 Tags: Update test indexing template for Jinja2
Jinja2 doesn't support the {% empty %} node, instead it uses
the {% else %} node for the same purpose.

Fixed the tag indexing failing test.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-11-27 05:16:18 -04:00
Roberto Rosario
cb408c768d PEP8: Code cleanups
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-11-27 04:26:56 -04:00
Roberto Rosario
03d51fe8e1 PEP8: Code cleanups
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-11-27 04:19:35 -04:00
Roberto Rosario
3394f97b25 Settings: Improve lazy values expression
Settings with lazy values are now more carefully checked
and converteed before serializing them.

Previously only the entire value was checked to see if it
was a promise. Now the value is checked to see if it is a
list or tuple and its members checked to see if they are
promises.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-11-27 04:17:59 -04:00
Roberto Rosario
7c6d466ab1 Settings: Expose new Django and Celery settings
Expose new Django settings via the UI: AUTH_PASSWORD_VALIDATORS,
DEBUG, DEFAULT_FROM_EMAIL, INTERNAL_IPS, LANGUAGES,
LANGUAGE_CODE, STATIC_URL, STATICFILES_STORAGE,
TIME_ZONE, WSGI_APPLICATION.

Expose a new Celery setting via the UI: CELERY_ALWAYS_EAGER.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-11-27 04:15:52 -04:00
Roberto Rosario
ba4858e77f Initial settings: Refactor setting bootstrapping
Refactor the initial environment settings and configuration file loading
fixing some issues loading Django settings.

Consolidate all database settings into a new single setting
called "DATABASES". This mirrors Django database setting
structure. This changes makes it possible to use configure
multiple databases and database routers from the environment
variables or configuration file.

Remove usage of django-environ. Only a small set of the
features provided by django-environ were being used.
Variable typecasting is now only YAML. YAML parsing
is implemented in code.

Previously the initial setting code added all settings
it found into the global symbol table. Now the settings
found are matched to a explicit list of allowed settings.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-11-27 04:06:21 -04:00
Roberto Rosario
544edea54a Mailer: Code cleanup
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-11-26 17:51:08 -04:00
Roberto Rosario
2738e3facf Converter: Move literal to the literls.py module
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-11-26 17:50:31 -04:00
Roberto Rosario
51f15a3131 Settings: Update defaults formats
Update the default values of the settings which pass
arguments to backends to be valid Python values and not
YAML strings.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-11-26 17:45:43 -04:00
Roberto Rosario
5c1eb59a1a Converter: Rename setting
Change the CONVERTER_GRAPHICS_BACKEND_CONFIG settings
to CONVERTER_GRAPHICS_BACKEND_ARGUMENTS for uniformity
and to convey it real purpose which is initializing a backend.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-11-26 17:39:48 -04:00
Roberto Rosario
f5f6470697 Settings: Make namespace a navigation link
Currently the link to navigate back to the settings
namespace is registered as an action when it is a link.
This commits changes it to a link in the facet menu.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-11-26 17:29:56 -04:00
Roberto Rosario
d5224d93a7 Settings: Remove support for quoted settings
Instead of passing strings as arguments to backends, all settings must
be formatted according to YAML specifications. This is to remove the
need to add separate YAML parsing to each backend argument in each
app that needs it. Argument passing to backends is not fully
uniform.

Users need to update their config files.
  Example:

    DOCUMENTS_STORAGE_BACKEND_ARGUMENTS: '{location: /home/rosarior/development/mayan-edms/mayan/media/document_storage}'

  must be changed to:

    DOCUMENTS_STORAGE_BACKEND_ARGUMENTS:
      location: /home/rosarior/development/mayan-edms/mayan/media/document_storage

  Example 2:

    CONVERTER_GRAPHICS_BACKEND_CONFIG: '        {            libreoffice_path: /usr/bin/libreoffice,            pdftoppm_dpi:
    300,            pdftoppm_format: jpeg,            pdftoppm_path: /usr/bin/pdftoppm,            pdfinfo_path:
    /usr/bin/pdfinfo,            pillow_format: JPEG        }    '

  must be changed to:

    CONVERTER_GRAPHICS_BACKEND_CONFIG:
      libreoffice_path: /usr/bin/libreoffice
      pdftoppm_dpi: 300
      pdftoppm_format: jpeg
      pdftoppm_path: /usr/bin/pdftoppm
      pdfinfo_path: /usr/bin/pdfinfo
      pillow_format: JPEG

  Example 3:

    OCR_BACKEND_ARGUMENTS: ''

  must be changed to:

    OCR_BACKEND_ARGUMENTS: {}

  Settings that need to be updated are:

  - COMMON_SHARED_STORAGE_ARGUMENTS
  - CONVERTER_GRAPHICS_BACKEND_CONFIG
  - DOCUMENTS_CACHE_STORAGE_BACKEND_ARGUMENTS
  - DOCUMENTS_STORAGE_BACKEND_ARGUMENTS
  - OCR_BACKEND_ARGUMENTS
  - SIGNATURES_STORAGE_BACKEND_ARGUMENTS
  - SOURCES_STAGING_FILE_CACHE_STORAGE_BACKEND_ARGUMENTS

  The following error will appear in the console if a setting is not yet
  updated to this new format::

      TypeError: type object argument after ** must be a mapping, not str

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-11-26 17:27:57 -04:00
Roberto Rosario
2047fb7b17 Development: Don't add dev apps blindly
Try to import the development apps before adding them
as installed apps.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-11-26 16:43:34 -04:00
Roberto Rosario
4b727662ef Settings: Update MIDDLEWARE_CLASSES to MIDDLEWARE
Update mentions of MIDDLEWARE_CLASSES to MIDDLEWARE in the
development and testing settings.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-11-25 02:15:50 -04:00
Roberto Rosario
6a7cd09bc1 Use Jinja2 as the template engine
Use Jinja2 to render the templates of the indexing,
workflows, smart links, user mailer and metadata apps.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-11-25 02:13:26 -04:00
Roberto Rosario
42d434f7bb Upload Wizard: Add double click support
Add support to select the document type using a Double Click action
on the form.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-11-25 01:34:44 -04:00
Roberto Rosario
e72b4e82a3 Forms: Add support for form hotkeys
Adds JavaScript support to monitor keypresses or mouse events
of forms with the classes .form-hotkey-enter or form-hotkey-double-click,
and trigger the click event of the button with the CSS class
.btn-hotkey-default.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-11-25 01:32:22 -04:00
Roberto Rosario
8e896a54f9 Middleware: Modernize middleware classes
Make the custom middleware provided by Mayan to use the
MiddlewareMixin provide by Django. This make the middleware
classes behave like classes or callables. This change ensures
compatibility with Django 2.x.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-11-25 00:59:39 -04:00
Roberto Rosario
2d5a646940 URLs: Remove development URLs from main URL file
Move the development URL definitions for Rosetta and Debug toolbar
to a separate URL file. Convert the single urls.py to a module to
allow multiple URL files to be used.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-11-25 00:32:17 -04:00
Roberto Rosario
b3c0b622b8 App: Remove admindocs
Remove admindocs which is not used in production.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-11-24 22:59:16 -04:00
Roberto Rosario
b04b205fb6 Add docstrings for almost all models
Also adds docstring to some managers and model methods.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-11-24 22:56:35 -04:00
Roberto Rosario
8c98679687 Dependencies: Remove django-suit from apps
Signed-off-by: Roberto Rosario <Roberto.Rosario.Gonzalez@gmail.com>
2018-11-22 04:59:10 -04:00
Roberto Rosario
6d39f3b716 Documents: Add missing import
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-11-16 22:02:33 -04:00
Roberto Rosario
21a6ed4756 Documents: Add document page icons
Add icons to the document page image and document page reset
views.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-11-16 21:58:10 -04:00
Roberto Rosario
3b247bfb5f Documents: Document task transformations
Add support to pass serialized transformation lists to the
document page generation task.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-11-16 21:51:57 -04:00
Roberto Rosario
823083a76c Converter: Add transformation serialization
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-11-16 21:51:32 -04:00
Roberto Rosario
4ee6add201 Documents: Document image API transformations
Add transformations support to the document image API.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-11-16 21:43:49 -04:00
Roberto Rosario
894a25ccce Appearance: Allow subclassing the TextArea widget
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-11-16 18:55:47 -04:00
Roberto Rosario
ecdc4a9a51 Appearance: Remove unused form_empty_label flag
This is superseded by the empty results template.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-11-16 18:48:32 -04:00
Roberto Rosario
2ae56d2cf4 Dependencies: Update Python dependencies version.
Remove django suit as a dependency.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-11-16 18:41:02 -04:00
Roberto Rosario
810558659d Documents: Add invalid document server template
Invalid document template is now served or included from
a specific template file. Documents with invalid
API image URLs now return None instead of the template code
specific '#'.  The new template is called invalid_document.html.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-11-16 18:23:43 -04:00
Roberto Rosario
957cf64fe5 Pagination: Add custom pure pagination subclasses
Add Paginator and Page subclasses that supports custom page
querystring keys.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-11-16 18:04:42 -04:00
Roberto Rosario
e8c70cbd08 Pagination: Fix unintented pagination AJAX reload
Add CSS class to disable reload when clicking on pagination active page
link.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-11-16 17:59:28 -04:00
Roberto Rosario
8cbae9021b Release: Update setup build string
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-11-01 03:55:42 -04:00
Roberto Rosario
8a971400b1 Release: Bump version to 3.1.9
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-11-01 03:55:06 -04:00
Roberto Rosario
fb3678bb6f Sources: Convert furl querystring to text
Convert the furl instance to text to allow serializing it into
JSON to be passed as arguments to the background task.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-11-01 03:50:34 -04:00
Roberto Rosario
7c5477b439 Release: Update build string
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-10-31 19:10:08 -04:00
Roberto Rosario
cc7362b269 Release: Bump version to 3.1.8
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-10-31 19:09:05 -04:00
Roberto Rosario
dcb55f4aff Utilities: Remove remarked statement
Remove print statement fromt he increase_version module.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-10-31 19:05:47 -04:00
Roberto Rosario
ba6fd842d2 Documentation: Add version 3.1.8 release notes
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-10-31 19:05:03 -04:00
Roberto Rosario
cf1726505b Documenation: Fix spelling errors
Fix spelling errors in documentation and other program texts.
Update the spelling exceptions list.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-10-31 18:41:20 -04:00
Roberto Rosario
8b41a9bfc9 Documentation: Expand the Source control section
Add new subsection explaining commit messages structure to be
used in the project.

Updates and expands explanations regarding the Git branch
structure used in the project.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-10-31 17:24:43 -04:00
Roberto Rosario
e109068b29 Indexing: Add document base property reindex
Add support for reindexing documents when their base properties like
the label and description are edited.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-10-31 17:08:56 -04:00
Roberto Rosario
9fc7c4fc09 Add explicit argument name of 'mode' to the open statement.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-10-31 16:53:48 -04:00
Roberto Rosario
5a8455bfc2 Update translation files.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-10-29 13:24:07 -04:00
Roberto Rosario
033d6751e0 Add utility and makefile target to increase version number mechanically. Update release checklist.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-10-29 12:55:24 -04:00
Roberto Rosario
d9ee75cc47 Merge branch 'feature/show_config' into versions/next
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-10-19 02:58:53 -04:00
Roberto Rosario
6ae24493eb Add new showsettings management command
This command displays the current configuration settings.
Default the YAML flow format to False which never uses inline.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-10-19 02:55:16 -04:00
Roberto Rosario
b4f43adc1a Documentation: Use Sphinx's extlinks to cut down on repeated URLs. Merge Administration and Maintenance topics. Add database conversion chapter. Unify the header format of all recent release notes. Fix :doc: references.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-10-18 23:02:30 -04:00
Roberto Rosario
46d48cc5ea Add template variable for the setup module build number.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-10-18 16:29:31 -04:00
Roberto Rosario
b74a323f2b Update changelog.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-10-18 16:21:43 -04:00
Roberto Rosario
bcd2427ab6 Move the noop OCR backend to the right place.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-10-18 16:21:12 -04:00
Roberto Rosario
8fcc61bde5 Update documentation. Add chapter on password resets. Add administration topic.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-10-17 21:38:58 -04:00
Roberto Rosario
b716971ba0 Add configuration option to change the project/installation URL. This is used in the password reset emails and in the default document mailing templates.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-10-17 21:34:48 -04:00
Roberto Rosario
ad822834d4 Center workflow preview.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-10-17 02:43:44 -04:00
Roberto Rosario
e222a71966 Remove the workflow preview size constraints.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-10-17 02:43:17 -04:00
Roberto Rosario
1f27670921 Add release notes for version 3.1.8
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-10-17 02:05:38 -04:00
Roberto Rosario
321b7ad5ae Add custom validator for multiple emails in a single text field. Change the widget of the email fields in the mailer app to avoid browser side email validation. Closes GitLab issue #530. Thanks to Mark Maglana @relaxdiego for the report.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-10-17 00:01:48 -04:00
Roberto Rosario
cc79e75d35 Add improvements to the metadata URL encoding and decoding to support ampersand characters as part of the metadata value. GitLab issue #529. Thanks to Mark Maglana @relaxdiego for the report.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-10-16 04:58:42 -04:00
Roberto Rosario
70bb250a23 Add data migrations to the sources app migraton 0019 to ensure all labels are unique before performing the schema migations.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-10-16 02:59:31 -04:00
Roberto Rosario
5eee810d8e Merge FAQ with the Wiki's FAQ page.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-10-16 01:21:14 -04:00
Roberto Rosario
37bd5862e6 Flip order of getting start and release notes topics
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-10-15 20:01:25 -04:00
Roberto Rosario
8bf6c37e35 Add workflow and API chapter. Expand tags chapter.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-10-15 20:00:25 -04:00
Roberto Rosario
e6c43bebf5 Reorganize documentation into topics and chapters. Add new material from Wiki.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-10-15 06:03:04 -04:00
Roberto Rosario
7cd62b5a85 Prepare files for release.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-10-14 03:52:05 -04:00
Roberto Rosario
d5ef08b636 Bump version to 3.1.7
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-10-14 03:51:25 -04:00
Roberto Rosario
c9fb3814d9 documenation: Add Docker installation method using a dedicated Docker network. Add scaling up chapter. Add S3 storage configuration section.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-10-14 03:47:41 -04:00
Roberto Rosario
5a922e2689 Fix the no contentn email test on Python 3.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-10-14 02:51:19 -04:00
Roberto Rosario
e55ce29c5f Make sure email messages are always of data type bytes.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-10-14 02:50:32 -04:00
Roberto Rosario
9634ba75a6 Update changelog and release notes.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-10-14 01:21:22 -04:00
Roberto Rosario
665dbb6766 Merge branch 'versions/next' into 'versions/next'
Versions/next

See merge request mayan-edms/mayan-edms!30

Closes GitLab issues #525 and #527
2018-10-14 05:15:21 +00:00
Hamish Farroq
4efc3ec182 Add noop OCR driver. 2018-10-14 05:07:06 +00:00
Hamish Farroq
e2e89efb47 Fix the path to the SECRET_KEY 2018-10-14 04:58:33 +00:00
Hamish Farroq
680e6721f1 Fix spelling, MAYAN_WORKERS_... to MAYAN_WORKER_... 2018-10-14 04:52:46 +00:00
Roberto Rosario
7a4302415a PEP8 cleanups.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-10-14 00:29:46 -04:00
Roberto Rosario
8c6ba747f0 Ignore document stub from the index mirror. GitLab issue #520. Thanks to TheOneValen @TheOneValen for the report.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-10-13 03:41:46 -04:00
Roberto Rosario
88f41a570e Make sure all key used as input for the cache key hash are bytes and not unicode. GitLab issue #520. Thanks to TheOneValen @TheOneValen for the report.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-10-13 03:38:50 -04:00
Roberto Rosario
e731cca629 Merge branch 'versions/next' of gitlab.com:mayan-edms/mayan-edms into versions/next 2018-10-12 12:35:07 -04:00
Roberto Rosario
eb357b18fc Don't load development apps if they are already loaded.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-10-12 03:10:56 -04:00
Roberto Rosario
38c84de708 Remove duplicate YAML loading of environment variables.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-10-12 03:10:09 -04:00
Roberto Rosario
417fc8f766 Fix an issue with some browsers not firing the .load event on cached images. Ref: http://api.jquery.com/load-event/
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-10-12 03:07:55 -04:00
Roberto Rosario
e508b3a7a2 Add link to version 3.1.6 release notes.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-10-09 22:34:10 -04:00
Roberto Rosario
abe9fa0e47 Prepare files for release.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-10-09 19:18:58 -04:00
Roberto Rosario
6c9da58ec3 Bump version to 3.1.6. Add release notes.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-10-09 19:18:23 -04:00
Roberto Rosario
cc27233765 Display the cabinet "Add new level" link in the top level view too.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-10-09 19:15:09 -04:00
Roberto Rosario
4cbe27a462 Add icon to the cabinet "Add new level" link.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-10-09 19:12:50 -04:00
Roberto Rosario
15b9c0c56f Only render the Template API view for authenticated users. Thanks rgarcia for the report.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-10-09 19:10:35 -04:00
Roberto Rosario
f34bead7d2 Improve index mirroring cache class to use the hash of the keys instead of the literal keys. Avoid warning about invalid key characters. Closes GitLab issue #518. Thanks to TheOneValen @ for the report.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-10-09 05:12:19 -04:00
Roberto Rosario
1e08653b88 Improve index mounting value clean up code to remove the spaces at the starts and at the end of directories. Closes again GitLab issue #520 Thanks to TheOneValen @ for the report.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-10-09 04:48:25 -04:00
Roberto Rosario
838035291d Prepape files for release.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-10-08 19:52:40 -04:00
Roberto Rosario
4ad84195e0 Fix document metadata app view error when adding multiple optional metadata types. Closes GitLab issue #521. Thanks to the TheOneValen @TheOneValen for the report.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-10-08 19:51:17 -04:00
Roberto Rosario
7ff974382b Add shared cache class and add mounted index cache invalidation when document and index instance nodes are updated or deleted.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-10-08 02:22:05 -04:00
Roberto Rosario
c715d0fc8e Prepare file for release.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-10-07 14:18:40 -04:00
Roberto Rosario
a49e7ebd0b Add Python 3.6 and Django 2.0 targets to the tox file.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-10-07 14:17:48 -04:00
Roberto Rosario
8c486d8459 Update installation instructions regarding libfuse2 and python-pip.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-10-07 14:17:11 -04:00
Roberto Rosario
6a3aae3348 Remove python-pip and add libfuse from Dockerfile.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-10-07 14:16:47 -04:00
Roberto Rosario
f0453357f8 Add libfuse2 library to test suit.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-10-07 14:16:15 -04:00
Roberto Rosario
03f5fdda56 Prepare files for release 3.1.5
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-10-07 04:45:58 -04:00
Roberto Rosario
9fae8ceb64 Bump version to 3.1.5.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-10-07 04:45:31 -04:00
Roberto Rosario
36f21b063d Fix documentation typos. Expand ignored wordlist.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-10-07 04:43:24 -04:00
Roberto Rosario
efc17eb075 Update changelog and release notes for 3.1.5
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-10-07 04:30:41 -04:00
Roberto Rosario
eeeb246ed7 Restore use of the .store_body variable accidentally remove in 63a77d0235. Thanks to TheOneValen @TheOneValen for the report.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-10-07 04:30:32 -04:00
Roberto Rosario
55c83689d2 Make sure the image in the document preview view is centered when it is smaller than the viewport.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-10-07 03:53:32 -04:00
Roberto Rosario
733216448d Coding style updates.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-10-07 03:50:07 -04:00
Roberto Rosario
16dce6b3aa Make sure metadata lookup choices are a list to be able to add the optional marker (Python 3).
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-10-07 03:40:37 -04:00
Roberto Rosario
8d81d1df7b Update the metadata app tests to work on Python 3.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-10-06 22:33:51 -04:00
Roberto Rosario
c6354beb92 Add separate Python 2 and Python 3 versions of the MetadataType model .comma_splitter() static method.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-10-06 22:32:29 -04:00
Roberto Rosario
c97ab57f51 URL quote the encoded names of the staging files using Django's compat module. (Python 3). Open staging file in explicit binary mode. (Python 3)
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-10-06 22:23:43 -04:00
Roberto Rosario
06c783820e Specify FUSE literals in explicit octal notation (Python 3).
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-10-06 22:21:18 -04:00
Roberto Rosario
7fb13a5888 Return a proper list of SearchModel instances (Python 3).
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-10-06 22:20:13 -04:00
Roberto Rosario
c6e68515ed Handle office files in explicit binary mode for Python 3.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-10-06 05:07:05 -04:00
Roberto Rosario
28706f5ea5 Update document parsing app tests to work with Python 3.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-10-06 05:03:24 -04:00
Roberto Rosario
36e4d78487 Add a modelform for adding and editing transformation and perform YAML validation of arguments. Add stricted error checking to the crop transformation.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-10-06 04:59:50 -04:00
Roberto Rosario
277ff7ef67 Update compressed files class module to work with Python 3.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-10-06 04:56:39 -04:00
Roberto Rosario
9c81c41624 Ignore virtualenv for Python 3.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-10-06 02:14:54 -04:00
Roberto Rosario
a99b044555 Code style improvement. Test code consolidation. PEP8 cleanups.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-10-06 02:13:36 -04:00
Roberto Rosario
025fafabf4 Code style cleanups. Switch to a smaller document for tests.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-10-06 00:10:23 -04:00
Roberto Rosario
0f8825454d Add link and view to show the content of parsed text for each document page.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-10-05 23:47:10 -04:00
Roberto Rosario
58fb762fac Update release notes for upcoming 3.1.5 version.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-10-05 21:54:51 -04:00
Roberto Rosario
ffbdcef3b4 Split the code of the mountindex command to be able to add tests. Fix the way the children of IndexInstanceNode are accessed. Fixes GitLab issue #518. Thanks to TheOneValen @TheOneValen for the report. Remove newlines from the index name levels before using them as FUSE directories. Fixed duplicated FUSE directory removal.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-10-05 21:49:52 -04:00
Roberto Rosario
598312c4d3 Consolidate some document indexing test code into a new mixin.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-10-05 21:45:49 -04:00
Roberto Rosario
fc82f64705 Install the enchant library needed to build the documentation spell checker.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-10-04 22:27:42 -04:00
Roberto Rosario
bac8c4f77c Prepare files for release.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-10-04 19:38:26 -04:00
Roberto Rosario
599ea0056c Bump version to 3.1.4.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-10-04 19:37:48 -04:00
Roberto Rosario
8e3484663b Add spell checking to documentation target.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-10-04 19:34:07 -04:00
Roberto Rosario
e9180f68d7 Update release notes. Fix typos is older documentation format.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-10-04 19:06:18 -04:00
Roberto Rosario
b6fbce16c0 Add explanation to the launch workflows tool.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-10-04 19:06:07 -04:00
Roberto Rosario
c9d7f7757f Split changelog by series.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-10-04 03:33:23 -04:00
Roberto Rosario
e0b7f31111 Improve search app. Refactored to resolve search queries by terms first then by field.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-10-04 03:29:03 -04:00
Roberto Rosario
2b2981af25 Add release for version 3.1.4
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-10-03 20:41:54 -04:00
Roberto Rosario
d663d0cf63 Add links to release notes and changelog in the about view.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-10-03 20:41:36 -04:00
Roberto Rosario
071e0db610 Strip HTML entities from the browser's window title. Closes GitLab issue #517. Thanks to Daniel Carrico @daniel1113 for the report.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-10-03 20:17:13 -04:00
Roberto Rosario
08a69f534e Update required Django version to 1.11.16.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-10-03 15:16:09 -04:00
Roberto Rosario
72678e31f3 Display the correct AJAX request error property.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-10-03 15:14:18 -04:00
Roberto Rosario
e9db07bfd3 Encapsulate in_trash field into is_in_trash symetric Document property
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-10-03 15:14:11 -04:00
Roberto Rosario
a023d893ea Remove debug print.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-10-03 15:14:00 -04:00
Roberto Rosario
626e1f3451 Fix workflow edit view tests. Improvie workflow view test via test mixins.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-10-03 15:13:51 -04:00
Roberto Rosario
3b369193a5 Show proper placeholder edit text on forms when no title is specified.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-10-03 15:13:34 -04:00
Roberto Rosario
a076c751ad Add support for reindexing document on content parsing changes.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-10-03 15:13:19 -04:00
Roberto Rosario
fb83a838fb Add support for indexing on OCR content changes.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-10-02 03:54:29 -04:00
Roberto Rosario
34c2fd6177 Load the DropZone CSS from package and remove the hard code CSS from appearance/base.css
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-10-02 03:10:18 -04:00
Roberto Rosario
bbfe35b8fd Disable the fancybox caption link if the document is in the trash.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-10-02 02:53:55 -04:00
Roberto Rosario
f6e39380af Remove use of hard coded font icon for document page rendering busy indicator.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-10-02 02:40:13 -04:00
Roberto Rosario
da8c9d08d8 Add Redis config entries in the Docker images to disable saving the database and to only provision 1 database.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-10-02 02:30:50 -04:00
Roberto Rosario
ded7eb0bfd Login to the GitLab registry before pulling the image.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-10-02 02:28:36 -04:00
Roberto Rosario
4228338870 Update related links. Add links to the new Wiki and Forum.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-10-02 02:26:09 -04:00
Roberto Rosario
4b4aac246b Fix the link to the documenation. Closes GitLab issue #516. Thanks to Matthias Urlichs @smurfix for the report.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-10-02 02:19:05 -04:00
Roberto Rosario
cdcf9096fb Fix text and formatting typo.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-09-27 15:52:08 -04:00
Roberto Rosario
916c8e2cab Rebuild documentation on the releases/all branch too.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-09-27 04:24:56 -04:00
Roberto Rosario
b25ebbef95 Merge remote-tracking branch 'origin/master' 2018-09-27 04:22:16 -04:00
Roberto Rosario
8f56adf311 Prepare files for release.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-09-27 04:20:43 -04:00
Roberto Rosario
e3aeb8cfef Bump version to 3.1.3
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-09-27 04:19:45 -04:00
Roberto Rosario
2d69c6114b Add Gitlab CI stage to build documentation.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-09-27 01:21:44 -04:00
Roberto Rosario
635263dc95 Update changelog.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-09-26 22:52:17 -04:00
Roberto Rosario
26ac7de70b Synchronize and compile translations
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-09-26 22:50:48 -04:00
Roberto Rosario
06e013788f Add release for version 3.1.3
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-09-26 22:30:55 -04:00
Roberto Rosario
38485b1cf8 Fix text typo in the converdb command.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-09-26 22:30:08 -04:00
Roberto Rosario
3c2557fb47 Update translation source files.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-09-26 22:29:54 -04:00
Roberto Rosario
4716e3eb15 Update docker documentation chapter.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-09-26 22:23:47 -04:00
Roberto Rosario
6159bdca45 Fix message typos.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-09-26 22:23:35 -04:00
Roberto Rosario
67b97c0ed0 Update Docker documentation chapter.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-09-26 21:23:15 -04:00
Roberto Rosario
c67c0e3742 Add support for changing the concurrency of the Celery workers in the Docker image. Add environment variables MAYAN_WORKER_FAST_CONCURRENCY, MAYAN_WORKER_MEDIUM_CONCURRENCY and MAYAN_WORKER_SLOW_CONCURRENCY.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-09-26 21:22:57 -04:00
Roberto Rosario
402039ff99 Improve deployment documentation chapter.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-09-26 21:10:36 -04:00
Roberto Rosario
71a0510af1 Expose the Django INSTALLED_APPS setting.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-09-26 20:27:07 -04:00
Roberto Rosario
9f17d7662b Add no results help text to the document type -> metadata type association view.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-09-26 16:52:13 -04:00
Roberto Rosario
7bda5b1fce Fix user groups view.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-09-26 16:49:35 -04:00
Roberto Rosario
d3c1204626 Make sure template API renders in non US languages.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-09-26 16:41:54 -04:00
Roberto Rosario
bd359a9ad9 Update the format of the MAYAN_ALLOWED_HOSTS environment setting. 2018-09-24 20:20:37 +00:00
Roberto Rosario
e46f55a2a2 Prepare files for release.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-09-21 03:02:46 -04:00
Roberto Rosario
8c229d4b36 Latest Django version is 1.11.15.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-09-21 03:01:57 -04:00
Roberto Rosario
1246d4360a Bump version to 3.1.2
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-09-21 02:43:21 -04:00
Roberto Rosario
97108fb9df Prepare files for release.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-09-21 02:42:20 -04:00
Roberto Rosario
98c44df9cc Add missing .self.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-09-21 02:39:59 -04:00
Roberto Rosario
758a14e358 Intercept document list view exception and display them as an error message.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-09-21 02:10:20 -04:00
Roberto Rosario
ff5a0d32d4 Only show smart link resolution errors to the user with the smart link edit permission.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-09-21 02:09:01 -04:00
Roberto Rosario
f600ca5a1a Fix label display for resolved smart links when not using a dynamic label.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-09-21 00:56:56 -04:00
Roberto Rosario
c8ff089707 Add database conversion test to the common app.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-09-21 00:49:01 -04:00
Roberto Rosario
7c4de79c8f Calculate the path of the test document before it is uploaded.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-09-21 00:47:35 -04:00
Roberto Rosario
a96e7574b2 Add support for natural keys to the DocumentPageImageCache model.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-09-21 00:47:11 -04:00
Roberto Rosario
9716e51914 Force load of serialized data when running as a test.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-09-21 00:26:24 -04:00
Roberto Rosario
022c92f775 Add an user test mixin to group user testing. Add test the user managament app for database conversion.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-09-21 00:12:45 -04:00
Roberto Rosario
5d24521049 Add test mixin to test the db conversion (dumping and loading) of a specific app.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-09-21 00:11:17 -04:00
Roberto Rosario
9e4ad9a64f Add support to the convertdb command to operate on specified apps too.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-09-21 00:09:58 -04:00
Roberto Rosario
06288e3d6d Update from Django 1.11.11 to 1.11.16
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-09-21 00:08:38 -04:00
Roberto Rosario
ef1f011cd5 Improve natural key support in the UserOptions model.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-09-21 00:07:51 -04:00
Roberto Rosario
923cb3a7f2 Update changelog.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-09-19 20:54:15 -04:00
Roberto Rosario
eda8d18146 Database access in data migrations defaults to the 'default' database. Force it to the user selected database instead.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-09-19 20:53:04 -04:00
Roberto Rosario
fdfa4755e9 Don't use a hardcoded database alias for the destination of the database conversion.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-09-19 20:52:31 -04:00
Roberto Rosario
74d45212ec Bump version to 3.1.1
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-09-18 22:11:01 -04:00
Roberto Rosario
ce7ae7a606 Prepare release 3.1.1.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-09-18 22:10:17 -04:00
Roberto Rosario
041f4e7331 Update release notes.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-09-18 22:03:25 -04:00
Roberto Rosario
618a5f0f59 Fix 90, 180 and 270 degrees rotation transformations.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-09-18 21:34:58 -04:00
Roberto Rosario
55284c4681 Make sure the AJAX spinner stays in place.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-09-18 21:19:50 -04:00
Roberto Rosario
fc9a782fb8 Push release images with the tag :latest too.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-09-17 23:48:32 -04:00
Roberto Rosario
0112e12375 Allow releasing Docker images separetly from Python packages.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-09-17 23:45:43 -04:00
Roberto Rosario
d1118e3767 Silence UnorderedObjectListWarning for the Group model. Not sorted by Django.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-09-17 23:38:41 -04:00
Roberto Rosario
5e98bedbc9 Rename the Docker image and push jobs.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-09-17 22:37:16 -04:00
Roberto Rosario
bbdab284f8 Set the Docker image version environment again and tag the image for upload to Docker Hub.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-09-17 22:30:59 -04:00
Roberto Rosario
ab56758197 Pull the image from GitLab's registry before attempting to uploading to Docker's registry.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-09-17 22:05:58 -04:00
Roberto Rosario
e9bc10a056 Fix python package build and push scripts.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-09-17 19:27:18 -04:00
Roberto Rosario
531ca12021 Bump version to 3.1.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-09-17 18:53:43 -04:00
Roberto Rosario
a986b58338 Prepare release files.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-09-17 18:52:26 -04:00
Roberto Rosario
ecdc122b15 Code cleanups.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-09-17 18:28:34 -04:00
Roberto Rosario
f2fff77aab Move information links from menu to the about view. Add template tag to import icons from the templates.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-09-17 18:13:15 -04:00
Roberto Rosario
c2bb697306 Add the current step and total steps of a wizard in the template context.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-09-17 17:09:59 -04:00
Roberto Rosario
62e221ffbb Make icon classes file template based.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-09-17 17:08:15 -04:00
Roberto Rosario
58f7b1b555 Add file_size and datetime fields to the DocumentPageCachedImage model.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-09-17 03:39:28 -04:00
Roberto Rosario
206dbb9b5b The size of the document type label field has been increased from 32 to 96 characters.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-09-17 03:14:27 -04:00
Roberto Rosario
804ef00d41 Add no results help text for the search results view.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-09-17 03:12:03 -04:00
Roberto Rosario
ac07d4a63f Add more icons to links.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-09-17 03:09:04 -04:00
Roberto Rosario
4d53c9aec7 Code clean up.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-09-17 02:54:47 -04:00
Roberto Rosario
a372fc5a07 Improve model help texts. Add respective migrations.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-09-17 02:46:16 -04:00
Roberto Rosario
03c54395cc Refactor the ModelAttribute class into two separate classes: ModelAttribute for executable model attributes and ModelField for actual ORM fields. Expose more document fields for use in smart links.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-09-17 02:43:04 -04:00
Roberto Rosario
fafdb538b3 Generalize the Javascript menu rendering into an API for templates that only refresh the menu when there are changes. Closes GitLab issue #511. Thanks to Daniel Carrico @daniel1113 for the report.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-09-16 21:48:37 -04:00
Roberto Rosario
654f2a1ad2 Move get_user_label to a module. Move user label text and separator to links modules.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-09-16 21:16:07 -04:00
Roberto Rosario
51cf39f4d8 Support named links, add templatetags to get menus, links and resolve them.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-09-16 21:12:09 -04:00
Roberto Rosario
e6eebe11a7 Move the matchHeight call from lazy loading to image loading.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-09-16 20:54:32 -04:00
Roberto Rosario
89256bfb9a Bump version to 3.1rc1
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-09-14 00:57:29 -04:00
Roberto Rosario
4df9fae737 The build string is now part of the mayan package metadata. Update forum link. Add instagram link.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-09-14 00:54:24 -04:00
Roberto Rosario
632f4b598b docs: Update release notes.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-09-14 00:21:02 -04:00
Roberto Rosario
a09511d0e9 document_indexing: Make IndexInstanceNodeManager a subclass of mptt.TreeManager.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-09-14 00:19:06 -04:00
Roberto Rosario
5880a650b3 document_indexing: Test for an empty node list instead of a non existing root node.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-09-14 00:18:02 -04:00
Roberto Rosario
0fadd84567 document_indexing: Fix typo in test literal.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-09-14 00:17:32 -04:00
Roberto Rosario
b8c5e2380e document_indexing: Make sure locks are release on exceptions. Remove document from nodes and delete empty nodes only at the start of the indexing process. When the indexing starts at the template node, make sure it starts with the root node.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-09-14 00:15:28 -04:00
Roberto Rosario
98f34a2f42 document_indexing: Sort task functions. Even when the document has been deleted before the task executes and can't remove the document, run the method to remove empty nodes since there is the posibility of there being some.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-09-14 00:13:28 -04:00
Roberto Rosario
afc48ae331 Fix typo in comment.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-09-14 00:12:41 -04:00
Roberto Rosario
b42161e404 Add no results help text to the key management views. Add creation icon to the workflow and metadata type no content help texts links.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-09-12 22:12:48 -04:00
Roberto Rosario
ab34694d49 Improve navigation in the key management views.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-09-12 22:12:10 -04:00
Roberto Rosario
efdc35aaec Fix sporadic index instance node tree id warning.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-09-12 21:35:17 -04:00
Roberto Rosario
031f5c8312 Merge branch 'versions/next' of gitlab.com:mayan-edms/mayan-edms into versions/next 2018-09-12 14:19:44 -04:00
Roberto Rosario
dd3013826f Bump version to 3.1 beta2.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-09-12 14:19:27 -04:00
Roberto Rosario
bc398d79cf Add HTML buffer to reduce flicker on AJAX menu update. GitLab issue #511.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-09-12 14:18:43 -04:00
Roberto Rosario
ecc60ce540 Add HTML buffer to reduce flicker on AJAX menu update. GitLab issue #511.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-09-12 14:17:19 -04:00
Roberto Rosario
c82125c611 Update changelog and release notes.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-09-12 13:49:27 -04:00
Roberto Rosario
732d275ec1 Default the AJAX spinner to hidden. Increase the time threshold needed to trigger the AJAX spiiner.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-09-12 13:47:40 -04:00
Roberto Rosario
e51a1a93d0 Merge branch 'feature/staging_file_caching' into versions/next 2018-09-12 13:34:14 -04:00
Roberto Rosario
f51ee02f08 Remove test Python 3 virtualenv files
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-09-12 13:33:30 -04:00
Roberto Rosario
a85d33fd8e Complete staging file caching refactor.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-09-12 13:32:41 -04:00
Roberto Rosario
1f5da1745a Improve empty document cabinet view message.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-09-12 03:50:15 -04:00
Roberto Rosario
55930689bb Update language files.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-09-12 03:45:51 -04:00
Roberto Rosario
9bc16aabc3 Initial commit to support staging file background image generation and caching.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-09-12 03:35:33 -04:00
Roberto Rosario
e42ea89db7 Show the document type being uploaded in the source view title.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-09-12 02:02:35 -04:00
Roberto Rosario
962f395831 Add new dashboard item to display the total page count.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-09-12 01:56:37 -04:00
Roberto Rosario
6a251575ac Make environment overrided setting message more clear.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-09-11 15:00:34 -04:00
Roberto Rosario
29aaa8d452 Include the test file in the manifes.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-09-07 19:17:02 -04:00
Roberto Rosario
bc5715254e Make sure the test requirements are installed in the virtualenv.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-09-07 04:55:46 -04:00
Roberto Rosario
2be29a2300 Install sudo to allow changing to the Mayan user. Install the database drivers in the final image instead of the base image. Use variable instead of the literal binaries.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-09-07 04:31:24 -04:00
Roberto Rosario
c2a1c2ca7b Bump version to 3.1 beta1.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-09-07 03:57:05 -04:00
Roberto Rosario
3f7fd9a445 Fix typo in the settings loader error report.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-09-07 03:35:33 -04:00
Roberto Rosario
5d39ec4ed3 Update the Docker install to mirror the new recommended installation process at /opt. Use virtualenv for the Docker install.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-09-07 03:34:58 -04:00
Roberto Rosario
f7a9550bb1 Improve Python 3 support in the sources app.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-09-06 17:38:17 -04:00
Roberto Rosario
e0d0567f1f Fix order in document indexing test.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-09-06 17:23:09 -04:00
Roberto Rosario
4ae7a32443 Update OCR app tests to work with Python 3.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-09-06 16:59:38 -04:00
Roberto Rosario
e41f2f73e7 Improve metadata app tests pass rate for Python 3.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-09-06 16:55:48 -04:00
Roberto Rosario
d3af59ec06 Add improvement to the mayan_statistics app for Python 3.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-09-06 16:46:35 -04:00
Roberto Rosario
91b2c99e77 Unify and improve linking app tests for Python 3.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-09-06 16:44:47 -04:00
Roberto Rosario
4eab4670be Unify tests that use upload documents. Add explicit mode when opening a file.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-09-06 03:38:17 -04:00
Roberto Rosario
388b61ca7a Provide a class magic method for proper sorting.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-09-06 03:37:15 -04:00
Roberto Rosario
976872df35 Type cast dictionary items to list before attemping to slice.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-09-06 03:36:20 -04:00
Roberto Rosario
9eb3d39558 Cast value to bytes before doing hash.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-09-06 03:35:50 -04:00
Roberto Rosario
44ac0932b3 Fix relative icon import.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-09-06 01:48:06 -04:00
Roberto Rosario
2fe6a15f1a Use Python 3 style print function.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-09-06 01:47:45 -04:00
Roberto Rosario
5b806a43e9 Add creation icons for document cabinet, metadata, comments and tags links.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-09-06 01:46:48 -04:00
Roberto Rosario
64ca5a623f PEP8 cleanups.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-09-05 04:56:39 -04:00
Roberto Rosario
4b2226cf04 Add tests for the index rebuild view.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-09-05 04:32:57 -04:00
Roberto Rosario
435fa774f0 Add support for preserving the extension of document files when using the quick label feature. Added to the document properties edit view and the document upload view. Closes GitLab issue #360.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-09-05 04:06:13 -04:00
Roberto Rosario
aac0852128 Clean up document download view class.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-09-05 01:03:40 -04:00
Roberto Rosario
12143ffda7 Fix document type quick label link when there are no results.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-09-05 01:03:04 -04:00
Roberto Rosario
1919e78041 Fix variable name in settings.utils
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-09-05 00:40:56 -04:00
Roberto Rosario
e5bb00d514 Finish refactor of the new compressed file class support. Closes GitLab issue #7.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-09-05 00:40:10 -04:00
Roberto Rosario
61d2cc3d03 Accept forum MERC proposal. Current solution is working at https://forum.mayan-edms.com. Old Google Group has been placed in read-only mode.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-09-04 23:53:58 -04:00
Roberto Rosario
891dc2d74b Fix Dockerfile typo.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-09-04 23:49:16 -04:00
Roberto Rosario
f57a3b23ba Add release notes 3.1.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-09-04 19:45:32 -04:00
Roberto Rosario
7e68853e47 Update changelog.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-09-04 03:25:33 -04:00
Roberto Rosario
d2ee960d42 Add custom AJAX spinner.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-09-04 03:17:41 -04:00
Roberto Rosario
0cb4e687ab Remove pace.js usage
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-09-04 03:17:16 -04:00
Roberto Rosario
bf079a8945 Don't refresh the partial main menu HTML if there are open dropdowns
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-09-04 02:06:04 -04:00
Roberto Rosario
1088248bf5 Add missing icon from the document state no result template.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-09-03 19:48:09 -04:00
Roberto Rosario
4eb3c47457 Implement partial refresh of the main menu.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-09-03 19:47:41 -04:00
Roberto Rosario
d8ade58472 Add explicit kwargs name.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-09-03 12:17:01 -04:00
Roberto Rosario
fce7ee99ea Add support for having a menu source being excluded from link sorting.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-09-01 04:15:33 -04:00
Roberto Rosario
6baa63a989 Restore usage of upstream django-celery package. Purge periodic tasks before dumping the database.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-09-01 03:41:34 -04:00
Roberto Rosario
427aad8277 Add no results help texts for the converter, source, motd and mailer app. Add help text to the document type list view. Tweak the CSS of the no result secondary links.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-09-01 03:10:45 -04:00
Roberto Rosario
c312a2a304 Remove the duplicated setting pdftotext_path from the OCR path. This is now handled by the document parsing app.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-09-01 02:12:08 -04:00
Roberto Rosario
607d178e94 Load a form's specialized JS libraries asynchronously. Move the Dropzone import to the sources app template.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-09-01 02:06:09 -04:00
Roberto Rosario
85a5bd995f Update failing OCR tests.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-08-30 13:31:08 -04:00
Roberto Rosario
a314e59be2 Update user management view tests.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-08-30 13:11:58 -04:00
Roberto Rosario
c9dedde1d0 Add no results help text.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-08-30 05:26:48 -04:00
Roberto Rosario
41b8d6157a Update tests to rely less on view response text.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-08-30 03:50:37 -04:00
Roberto Rosario
6594756c5b Replace use of mayan.__title__ with common project title to ensure the overrided name is displayed in all views.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-08-28 03:48:51 -04:00
Roberto Rosario
5eba4f67e5 Add link to view a specific page's OCR content.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-08-28 03:39:42 -04:00
Roberto Rosario
495ab7fd9b Add no result help text for the document duplicates view and trash can view.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-08-27 15:45:22 -04:00
Roberto Rosario
671b7f102e Add no results help text for the document type quick label list view. Assign icon to the document type quick label objects.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-08-27 04:09:09 -04:00
Roberto Rosario
e6db0ff098 The document type OCR setup permission can now be granted for individual document types. Instead of the document OCR permissions, the document type OCR setting permission is required to view the global OCR error list.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-08-27 03:55:45 -04:00
Roberto Rosario
3eb68db323 Instead of the document content view, the document type parsing setup permissions is now required to view the parsing error list. The document type parsing setup permission can now be granted for individual document types.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-08-27 03:52:26 -04:00
Roberto Rosario
abcc6539c8 Don't try to update globals if there are no settings.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-08-27 03:45:05 -04:00
Roberto Rosario
10f10cadeb Add note about environment overrides.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-08-26 07:17:27 -04:00
Roberto Rosario
57eb390845 Add support for changing the HOME_VIEW, LOGIN_URL and LOGIN_REDIRECT_URL from the settings view.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-08-26 07:17:03 -04:00
Roberto Rosario
600fa16d8c Add empty result text to the user events views. Add icon to the acls create link.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-08-26 06:57:10 -04:00
Roberto Rosario
69b80aff1d Add support for blocking the changing of password for specify users.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-08-26 06:56:48 -04:00
Roberto Rosario
c3312d964f Add blank result messages for the index, index instance and favorited documents views.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-08-26 05:55:36 -04:00
Roberto Rosario
baeefe7e07 Add message when there are no object events.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-08-26 05:38:36 -04:00
Roberto Rosario
de000735ba Add the tag created and tag edited events.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-08-26 05:38:21 -04:00
Roberto Rosario
e7279a391e Don't show the document types of an index instance.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-08-26 05:20:44 -04:00
Roberto Rosario
c6aab372cb Compose the setting widget in a safer way.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-08-26 05:12:01 -04:00
Roberto Rosario
b5abb04c0d The official config filename is config.yml. Interpret ALLOWED_HOSTS as YAML.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-08-26 05:11:42 -04:00
Roberto Rosario
4a61275e80 Change the official config filename to config.yml. Interpret ALLOWED_HOSTS as YAML.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-08-26 05:10:33 -04:00
Roberto Rosario
040c99d809 Add a new column to settings showing if they are overrided via environment variable.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-08-26 05:09:21 -04:00
Roberto Rosario
9adf48821d Add a celery setting namespace.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-08-26 05:07:54 -04:00
Roberto Rosario
7389369832 Add support for the two state widget to be centered.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-08-26 05:07:30 -04:00
Roberto Rosario
58cb79c95a Interpret environment variables as YAML.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-08-26 05:06:53 -04:00
Roberto Rosario
1126837993 Add new Python package build and push stages. Reduce the number of branches that trigger tests.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-08-25 18:01:40 -04:00
Roberto Rosario
d6b767eb93 Fix typos from the 3-way "papercut" patch merge.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-08-24 01:23:13 -04:00
Roberto Rosario
c6d3ffa28b Update Django template reference URL from Django 1.7 to Django 1.11. Add migratons to update model definitions.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-08-23 19:55:30 -04:00
Roberto Rosario
9273eccbd6 Add support for extended templates when there are no results. Add help messages and useful links to several apps when there are no results available.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-08-23 19:45:48 -04:00
Roberto Rosario
2a45f52eb9 Add explicit argument name.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-08-23 17:09:01 -04:00
Roberto Rosario
377166e491 Improve link request resolution fallback code.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-08-23 17:08:35 -04:00
Roberto Rosario
7b6c38e85b Sort facet link, object, secondady and sidebar actions.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-08-23 17:08:17 -04:00
Roberto Rosario
75f6d44509 Add to the AccessControlList parent accesor code to handle related fields.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-08-23 16:20:35 -04:00
Roberto Rosario
2f120d99aa Don't process the AttributeError exception but let calling code handle it.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-08-23 16:19:30 -04:00
Roberto Rosario
ec8cbee3c8 Take the project description from the project main module.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-08-23 13:06:00 -04:00
Roberto Rosario
d5b9c785fb Improve statistics subclassing. Split class module into classes and renderers.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-08-23 13:05:34 -04:00
Roberto Rosario
d36faa5b7a The multiple document action dropdown is now sorted alphabetically.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-08-23 03:38:23 -04:00
Roberto Rosario
5174f03994 Add support for sorting the results of a menu alphabetically.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-08-23 03:37:25 -04:00
Roberto Rosario
12cfdafecf Redirect to the same chart when queuing a chat for update.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-08-23 03:37:07 -04:00
Roberto Rosario
c760dd883d Fix double title in chart template.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-08-23 03:35:42 -04:00
Roberto Rosario
649fb544a9 Add support for filtering document statistics by request user.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-08-23 03:35:11 -04:00
Roberto Rosario
4c3ca0de91 In addition to the document view permission, the checkout detail view permission is now needed to view the list of checked out document.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-08-23 03:34:49 -04:00
Roberto Rosario
f11eef7445 Add new class based dashboard widget. This new widget supports subclassing and is template based. All exising widgets have been converted. ACL filtering was added to the widget results.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-08-23 03:30:06 -04:00
Roberto Rosario
26b31da443 Add favorite documents per user. Adds new setting option DOCUMENTS_FAVORITE_COUNT.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-08-23 01:50:35 -04:00
Roberto Rosario
ec44e81864 Add support to the ObjectActionMixin to report on instance action failures. Add also an error_message class property and the new ActionError exception.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-08-23 01:48:43 -04:00
Roberto Rosario
48e7b7970c Speed up tests.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-08-23 00:17:53 -04:00
Roberto Rosario
d6fd1b66c6 Speed up lock manager tests.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-08-22 23:03:55 -04:00
Roberto Rosario
7056f0691a Move Link class condition testing to its original location and revert the optimization.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-08-22 22:54:04 -04:00
Roberto Rosario
5c015ccdc3 Update failing test.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-08-22 22:53:43 -04:00
Roberto Rosario
1c2c77728a Update missing view resolution name.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-08-22 22:35:15 -04:00
Roberto Rosario
103ded5145 Use platform independant hashing for transformations.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-08-22 22:35:01 -04:00
Roberto Rosario
34b3cc3286 Fix the error number constant and display a log warning.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-08-22 12:25:04 -04:00
Roberto Rosario
5a2f7495c1 Add missing import.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-08-22 04:07:05 -04:00
Roberto Rosario
9a7e95f5b7 Add recently added document list view. The setting DOCUMENTS_RECENT_COUNT has been renamed to DOCUMENTS_RECENT_ACCESS_COUNT. New setting DOCUMENTS_RECENT_ADDED_COUNT added.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-08-22 04:06:46 -04:00
Roberto Rosario
2787a1c395 Sort documents by label.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-08-22 03:21:46 -04:00
Roberto Rosario
3c57f7ffa7 Merge branch 'master' into merge_master
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-08-22 03:18:30 -04:00
Roberto Rosario
66e7524924 Add support for the fillcolor argument to the rotate transformation.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-08-22 03:15:02 -04:00
Roberto Rosario
a4552cf415 Fix failing tests.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-08-22 02:56:16 -04:00
Roberto Rosario
78bfc6501c Only show the settings namespace list link where it is relevant.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-08-22 02:37:12 -04:00
Roberto Rosario
6098bdb0b0 Update forum link in the about menu.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-08-22 02:30:11 -04:00
Roberto Rosario
a33027dc39 Don't error out if the path to the backup setting file doesn't exist.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-08-22 02:28:37 -04:00
Roberto Rosario
b5215b40c3 Disable the Tags menu when the user doesn't have the tag create permission or the tag view access for any tag. Disable the Cabinets menu when the user doesn't have the cabinet create permission or the cabinet view permission for any cabinet.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-08-22 02:25:54 -04:00
Roberto Rosario
66cf86e816 Add support to conditionally disable menus.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-08-22 02:23:23 -04:00
Roberto Rosario
dfd2d3dc78 Add new document indexing permission. This permission allows user to view an index instance as opposed to the current permission which allows viewing an index definiton on the setup menu. Modernize the document index view tests.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-08-22 01:04:36 -04:00
Roberto Rosario
1890ff5bee Add missing permission check to the document duplicate scan link.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-08-22 00:42:37 -04:00
Roberto Rosario
5210fdc9d8 The index rebuild permission can now be set as part of the index ACL for each individual index. Add cascade permission check to the index rebuild tool link. The index rebuild tool now responds with the number of indexes queued to rebuild instead of a static acknowledment.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-08-22 00:36:19 -04:00
Roberto Rosario
76895db846 Add code explation remark.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-08-22 00:16:18 -04:00
Roberto Rosario
79095a88a0 Add sub title explanation to the role permission view.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-08-22 00:15:52 -04:00
Roberto Rosario
b3c4dd380c Add ACL support to the message of the day app.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-08-22 00:15:30 -04:00
Roberto Rosario
bf3723ae24 Add cascade permission checks for links. Avoid allowing users to reach a empty views because they don't access to any of the view's objects. Apply link permission cascade checks to the message of the day, indexing and parsing, setup link.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-08-22 00:14:21 -04:00
Roberto Rosario
8e39016f12 Code cleanups.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-08-21 18:57:38 -04:00
Roberto Rosario
2f48bf4fcb Add metadata event tests.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-08-21 18:47:21 -04:00
Roberto Rosario
bf7c9fc0fd Export the document test mixins via the tests top level __init__
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-08-21 18:43:01 -04:00
Roberto Rosario
78c374dfe6 Add ACL support for metadata types.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-08-21 18:42:40 -04:00
Roberto Rosario
dee7dd5429 Renamed setting LOCK_MANAGER_DEFAULT_BACKEND to LOCK_MANAGER_BACKEND. Add help text to settings.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-08-20 02:50:48 -04:00
Roberto Rosario
958f85eb1e Fix YAML quoting issues.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-08-20 02:49:10 -04:00
Roberto Rosario
04868e66bc Add new setting namespace for the stock Django config options.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-08-19 03:50:33 -04:00
Roberto Rosario
885be348d4 Improve setting dump serialization.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-08-19 03:50:15 -04:00
Roberto Rosario
89c145adde Fix failing tests after tag redirect update 3ca6595fe6.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-08-17 04:52:12 -04:00
Roberto Rosario
900276fe74 Merge branch 'master' into releases
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-08-17 04:18:57 -04:00
Roberto Rosario
9965866639 Bump version to 3.0.3
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-08-17 04:17:49 -04:00
Roberto Rosario
3ca6595fe6 Tags app: Add explicit post action redirect for the tag attach and tag remove actions when working on a single document.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-08-17 04:16:06 -04:00
Roberto Rosario
076468a922 Add explicit casting of escaped tag labels to prevent exploit of cross site scripting. Thanks to Lokesh (@lokesh1095) for the report and proposed solutions. Closes GitLab issue #496.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-08-17 04:12:00 -04:00
Roberto Rosario
fcb209caae Add mention of fixed issue 491.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-08-17 00:47:57 -04:00
Roberto Rosario
b1d31b1f6b Expand and make release checklist more clear.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-08-17 00:42:52 -04:00
Roberto Rosario
df6a3dfe28 Also run all the test on git push to the releases branch.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-08-17 00:30:51 -04:00
Roberto Rosario
9bb7708ffb Bump Docker image version to 3.0.2
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-08-17 00:29:19 -04:00
Roberto Rosario
4fe0f47a9c Only publish commits to the releases branch.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-08-17 00:28:54 -04:00
Roberto Rosario
073bc4fde9 Fix changelog markup typo.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-08-16 21:12:59 -04:00
Roberto Rosario
e400327770 Language translation synchonization.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-08-16 21:12:11 -04:00
Roberto Rosario
1491a6d47b Replace underscore with dashed in Makefile translation targets for uniformity.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-08-16 20:47:35 -04:00
Roberto Rosario
dca2b49624 Merge branch 'docker-compose-db-driver-wrong-variable' into 'master'
Fix docker compose variable name & content

See merge request mayan-edms/mayan-edms!27
2018-08-17 00:25:52 +00:00
Roberto Rosario
405e46ca09 Merge branch 'patch-1' into 'master'
Update views.py. Corrected minor grammatical errors in the upload queue message.

See merge request mayan-edms/mayan-edms!26
2018-08-17 00:23:49 +00:00
Roberto Rosario
bb7fffff46 Merge remote-tracking branch 'origin/master' 2018-08-16 19:41:53 -04:00
Roberto Rosario
687b2e2024 Add version 3.0.2 release notes.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-08-16 19:40:36 -04:00
Roberto Rosario
a4f8cc56b8 Merge branch 'patch-1' into 'master'
Update installation.rst

See merge request mayan-edms/mayan-edms!28
2018-08-16 23:32:05 +00:00
Roberto Rosario
e2a4892b1b Bump version to 3.0.2
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-08-16 19:27:32 -04:00
Roberto Rosario
48dfc06e49 Cabinets app: Escape cabinet labels to avoid possible exploit of cross site scripting. Thanks to Lokesh (@lokesh1095) for the report and proposed solutions. Closes GitLab issue #495.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-08-16 19:26:37 -04:00
Roberto Rosario
9ebe80595a Avoid setting window.location directly to avoid exploit of cross site scripting. Thanks to Lokesh (@lokesh1095) for the report and solution. Closes GitLab issue #494.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-08-16 18:46:10 -04:00
Roberto Rosario
ed76278096 Update changelog.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-08-16 16:05:13 -04:00
Roberto Rosario
be7169c259 Define a proper redirection after workflow actions are edited.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-08-16 16:02:34 -04:00
Roberto Rosario
a9a66391b6 Hide the title link of documents in the trash.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-08-16 16:02:01 -04:00
Roberto Rosario
9a0f2a0084 Update changelog.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-08-16 15:59:16 -04:00
Roberto Rosario
c384b137a3 Add support for hiding a links icon. Hide all object menu links' icons.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-08-16 15:57:27 -04:00
Roberto Rosario
d63a133852 Remove code statistics from the documentation. Remove the pending work chapter. This is now available in the Wiki:
wiki.mayan-edms.com

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-08-16 15:56:36 -04:00
Roberto Rosario
947568de3a Update changelog.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-08-16 15:55:49 -04:00
Roberto Rosario
737b39cdb5 Rename the multi document download link from "Download" to "Advanced download" for consistency.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-08-16 15:55:19 -04:00
Roberto Rosario
a4d21c76e9 Fix swapped dashboard icons.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-08-16 15:54:24 -04:00
Roberto Rosario
418aa14e2a Include querystring when force reload of a bare template view.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-08-16 15:53:44 -04:00
Roberto Rosario
1034a3056d Display error when attempting to recalculate the page count of an empty
document (document stub that has no document version).

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-08-16 15:52:02 -04:00
Roberto Rosario
05633ddc7e Increase gunicorn's timeout from 30 seconds to 120.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-08-16 15:50:57 -04:00
Roberto Rosario
d567602d2a Update dropzone.js' timeout from 30 seconds to 120 to allow upload of large files on slow connections.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-08-16 15:50:27 -04:00
Roberto Rosario
3c304976f7 Update changelog.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-08-16 15:49:53 -04:00
Roberto Rosario
eff9988239 Detect if Docker installed.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-08-16 15:49:12 -04:00
Roberto Rosario
d29044d034 Fix post login redirection to honor the ?next= URL query string
argument. Thanks go to K.C. Wong (@dvusboy1) for the report and investigation.
Closes GitLab issue #489.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-08-16 15:48:27 -04:00
Roberto Rosario
b22174adf5 Fix crop transformation argument parsing.
Add error checking to the crop transformation arguments.
Thanks to Jordan Wages (@wagesj45) for the report and investigation on the issue.
Closes GitLab issue #490

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-08-16 15:46:50 -04:00
Roberto Rosario
571cd172fc Update changelog.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-08-16 15:45:46 -04:00
Roberto Rosario
7f692710b3 Limit the number of branches that trigger the full test suit.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-08-16 15:43:16 -04:00
Roberto Rosario
dba94fbff3 Redirect to the cabinet list view after creating a new cabinet.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-08-16 15:40:30 -04:00
Roberto Rosario
c5c269f7ea Add natural key support to the user mailer model.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-08-16 15:40:00 -04:00
Roberto Rosario
1910547454 Add natural key support to the Index model.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-08-16 15:39:27 -04:00
Roberto Rosario
693948fa61 Update changelog.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-08-16 15:38:11 -04:00
Michael Price
0f955937a9 Add step to restart redis after configuration change.
Signed-off-by: Michael Price <loneviking72@gmail.com>
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-08-16 15:37:08 -04:00
Roberto Rosario
35d1b31e1c Update changelog.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-08-16 15:35:39 -04:00
Michael Price
8af684aa0a Default VERBOSE variable to true. Increase startup timer to 10 seconds. Allow configuring the PostgreSQL port.
Signed-off-by: Michael Price <loneviking72@gmail.com>
2018-08-16 15:33:29 -04:00
Franz Holzinger
a015dbc4dd Update installation.rst
misspelling for installation
2018-08-16 14:51:27 +00:00
Roberto Rosario
90cd142e76 Add support for YAML configuration files. Add support for editing setting options and saving them using the new YAML configuration file support. Add new revertsettings management command. Add new permission to edit setting via the UI.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-08-16 03:05:26 -04:00
Roberto Rosario
ac5f53c538 Add COMMON_PROJECT_TITLE as a setting option to customize the title string.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-08-16 03:02:21 -04:00
Roberto Rosario
3d1771a783 Don't execute document renaming if there is workflow action is not configured.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-08-15 18:26:04 -04:00
Roberto Rosario
5f233ca632 Perform link request resolution the new faster way and fallback to the old method.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-08-15 18:04:25 -04:00
Roberto Rosario
930c9bdc51 Update release notes.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-08-15 18:03:49 -04:00
Roberto Rosario
301df39be4 Define a proper redirection after workflow actions are edited.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-08-15 17:52:23 -04:00
Roberto Rosario
27a27daed2 Add workflow action to update the label and description of a document.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-08-15 17:52:04 -04:00
Roberto Rosario
65f27b006a Add a description to the label field of the workflow action model to differentiate from the 'label' field of the document.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-08-15 17:50:55 -04:00
Roberto Rosario
bdfb62d2b3 Show all event columns in the object list view.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-08-15 05:04:28 -04:00
Roberto Rosario
0022548e35 Add support for document metadata events: add, edit and remove.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-08-15 05:04:09 -04:00
Roberto Rosario
0a653a08bd Fix document workflow action context content.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-08-15 04:53:58 -04:00
Roberto Rosario
954dd8b994 Hide the title link of documents in the trash.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-08-15 03:47:39 -04:00
Roberto Rosario
52ef2f3dae Add link to view the events of a tag. Add support for subscribing to the events of a tag. Add the tag events view permissions to the tag model ACL.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-08-15 03:46:28 -04:00
Roberto Rosario
4e762d7522 Add new metadata app events: metadata type created, metadata type edited, metadata type to document type relationship update. Add link to metadata type events. Add support for subscribing to metadata type events.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-08-15 03:23:30 -04:00
Roberto Rosario
4c394aec50 Add support for hiding a links icon. Hide all object menu links' icons.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-08-15 03:19:19 -04:00
Roberto Rosario
cd76b1fd4a Add new document app events: document type created and document type edited. Add link to document type events.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-08-15 03:18:46 -04:00
Roberto Rosario
b3ef018d6c Make sure the on entry action of the initial state of workflows executes on document creation.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-08-14 04:50:44 -04:00
Roberto Rosario
5cd7ac88d6 Code cleanups.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-08-14 03:41:07 -04:00
Roberto Rosario
b619444e43 Sort view classes.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-08-14 03:32:33 -04:00
Roberto Rosario
57e1fe8cf0 Unify template title rendering. Add support for template subtitles.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-08-14 03:32:19 -04:00
Roberto Rosario
fe9a395724 Merge branch 'versions/next' into feature/quick_label
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-08-14 00:57:41 -04:00
Roberto Rosario
11e017b3db Remove code statistics from the documentation. Remove the pending work chapter. This is now available in the Wiki:
wiki.mayan-edms.com

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-08-14 00:56:36 -04:00
Roberto Rosario
7124676eb5 Rewrite Mayan's Javascript suite MayanApp into ECMAScript2015. Remove use is waitForJQuery.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-08-14 00:51:05 -04:00
Roberto Rosario
7f14b9c5e1 Rename the multi document download link from "Download" to "Advanced download" for consistency.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-08-13 23:39:30 -04:00
Roberto Rosario
65f24b4227 Divs are not allowed inside anchors. Use instead a span with a block type display.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-08-13 23:36:02 -04:00
Roberto Rosario
af66abaf57 Speed up document image fade in reveal. Use reseteable timer to ensure more document panels heights are matched.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-08-13 23:35:33 -04:00
Roberto Rosario
62892105a0 Fix tag loading order in the document printing template.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-08-13 22:14:14 -04:00
Roberto Rosario
526dac7a26 Increase default document caching timeout to 1 year.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-08-13 22:13:32 -04:00
Roberto Rosario
8fb2c78f29 Optimize request resolution from the context when resolving links and menus.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-08-13 22:12:42 -04:00
Roberto Rosario
709403a01f Fix swapped dashboard icons.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-08-13 22:12:17 -04:00
Roberto Rosario
de87f83c05 Include querystring when force reload of a bare template view.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-08-13 22:09:38 -04:00
Dennis von der Bey
ba28d08a7b Fix docker compose variable name & content
Failed to use postgresql and fell back to sqlite
2018-08-12 20:09:21 +00:00
Roberto Rosario
87ff0696d3 Enable the select2 widget for the quick label selection field.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-08-08 17:02:58 -04:00
Roberto Rosario
565f6caa0d Add missing .value method to the document image cache setting usage.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-08-08 02:26:36 -04:00
Roberto Rosario
c9bb13f149 Add support for client side caching of document page images. The time
the images are cached is controlled by the new setting
DOCUMENTS_PAGE_IMAGE_CACHE_TIME which defaults to 3600 seconds (1 hour).

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-08-08 01:31:21 -04:00
Roberto Rosario
170a83b06f Sort document app settings.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-08-08 01:22:17 -04:00
Roberto Rosario
928c80cc02 Remove usage of the compress tag.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-08-08 01:16:05 -04:00
Roberto Rosario
418e603222 Display error when attempting to recalculate the page count of an empty
document (document stub that has no document version).

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-08-08 01:15:30 -04:00
Roberto Rosario
0d46b0a252 Remove use of django-compressor and cssmin now that the project used
Whitenoise.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-08-07 23:14:46 -04:00
Roberto Rosario
e7cb4cf6c3 Update packages versions: Pillow:5.2.0, PyYAML:3.13, django-environ:0.4.5,
django-model-utils:3.1.2, django-mptt:0.9.1, django-widget-tweaks: 1.4.2,
flanker:0.9.0, flex:6.13.2, furl:1.2, gevent:1.3.5, graphviz: 0.8.4,
gunicorn:19.9.0, pyocr:0.5.2, python-dateutil:2.7.3

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-08-07 23:13:49 -04:00
Roberto Rosario
648b3e9d7f Update setup.py with the new dependencies.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-08-07 22:54:20 -04:00
Roberto Rosario
1b1d549bbf Increase gunicorn's timeout from 30 seconds to 120.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-08-07 22:54:05 -04:00
Roberto Rosario
0489eb8f7d Update dropzone.js' timeout from 30 seconds to 120 to allow upload of large files on slow connections.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-08-07 22:52:24 -04:00
Roberto Rosario
0d1c9a5ac1 Merge branch 'feature/db_migration' into versions/next 2018-08-07 22:40:16 -04:00
Roberto Rosario
1594e7a792 Detect if Docker installed.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-08-06 15:34:21 -04:00
Roberto Rosario
493ba214f2 Sort the manager methods of the checkouts app.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-08-06 14:57:28 -04:00
Roberto Rosario
14bea94030 Update pathlib imports to pathlib2.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-08-06 14:55:14 -04:00
Roberto Rosario
3937696774 Add natural key support to the models of the checkouts app.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-08-06 14:54:55 -04:00
Roberto Rosario
7994803e8f Add the upstream version of django-celery to the removal list.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-08-06 14:44:03 -04:00
Roberto Rosario
c02a8bb3e3 Switch to pathlib2
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-08-06 14:43:30 -04:00
Roberto Rosario
9183369bdb Use patched version of django-celery with support for natural key.
https://github.com/celery/django-celery/pull/552

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-08-05 20:44:37 -04:00
Roberto Rosario
10231363e6 Add natural key support to the document parsing app.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-08-05 20:07:57 -04:00
Roberto Rosario
4f028b1f54 Convert the two_state_widget to a class and update it to use the new icon class.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-08-04 16:56:03 -04:00
Roberto Rosario
7a4202b459 Update the document indexing widgets to use the new icon class.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-08-04 16:51:42 -04:00
Roberto Rosario
ffa8a4c5e2 Add icon class with support for multiple CSS classes.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-08-04 16:01:04 -04:00
Roberto Rosario
37fc968f50 Merge branch 'versions/next' into feature/db_migration
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-08-04 01:59:17 -04:00
Roberto Rosario
cc62988d4d Fix post login redirection to honor the ?next= URL query string
argument. Thanks go to K.C. Wong (@dvusboy1) for the report and investigation.
Closes GitLab issue #489.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-08-04 01:36:57 -04:00
Roberto Rosario
42ea33d760 Fix crop transformation argument parsing.
Add error checking to the crop transformation arguments.
Thanks to Jordan Wages (@wagesj45) for the report and investigation on the issue.
Closes GitLab issue #490

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-08-04 00:49:58 -04:00
Roberto Rosario
81f340ee16 Limit the number of branches that trigger the full test suit.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-08-04 00:06:36 -04:00
Roberto Rosario
e6fa31a4e5 Redirect to the cabinet list view after creating a new cabinet.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-08-04 00:06:16 -04:00
Roberto Rosario
3aecf817ce Make source label field unique.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-08-04 00:06:03 -04:00
Roberto Rosario
b14d7d6da0 Add release notes for version 3.1.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-08-03 19:25:49 -04:00
Roberto Rosario
0c1c38917c Make format explicit JSON
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-08-03 19:25:24 -04:00
Roberto Rosario
f756584176 Make source label field unique.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-08-03 18:54:30 -04:00
Roberto Rosario
cbcb8a84c5 Add natural key support to the user mailer model.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-08-03 18:52:53 -04:00
Roberto Rosario
0626529228 Add natural key support to Document pages.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-08-03 18:52:13 -04:00
Roberto Rosario
f42e1a96b2 Add natural key support to the Index model.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-08-03 18:51:17 -04:00
Roberto Rosario
4dea5911da Redirect to the cabinet list view after creating a new cabinet.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-08-03 18:50:40 -04:00
Roberto Rosario
fc304394f5 Add convertdb command.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-08-03 18:50:30 -04:00
Roberto Rosario
e18c043c1f Improve natural key handing for the Document, Metadata, DocumentMetadata, DocumentTypeOCRSetting and UserProfileLocale models.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-08-02 16:00:22 -04:00
Roberto Rosario
1ad7d2a406 Limit the number of branches that trigger the full test suit.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-08-02 15:56:47 -04:00
Roberto Rosario
0faeb2626a Merge branch 'master' into feature/db_migration 2018-08-01 05:11:44 -04:00
Roberto Rosario
c665e75871 Improve serialization migration for the models: Document, DocumentVersion, DocumentMetadata and DocumentTypeOCRSettings
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-08-01 05:09:43 -04:00
Michel Lavoie
57b60c7b2f Update views.py. Corrected minor grammatical errors in the upload queue message. 2018-07-17 12:38:33 +00:00
Michael Price
71ada209f6 Add step to restart redis after configuration change.
Signed-off-by: Michael Price <loneviking72@gmail.com>
2018-07-14 00:14:32 -04:00
Michael Price
d78527ec10 Default VERBOSE variable to true. Increase startup timer to 10 seconds. Allow configuring the PostgreSQL port.
Signed-off-by: Michael Price <loneviking72@gmail.com>
2018-07-14 00:12:15 -04:00
Eric Riggs
6722394e34 Add Docker and install step to have Redis discard data when out of memory.
Signed-off-by: Eric Riggs <ericriggs42@gmail.com>
2018-07-10 04:48:42 -04:00
Eric Riggs
27dcc2a7e7 Update LICENSE copyright time span to match main module's copyright time span.
Signed-off-by: Eric Riggs <ericriggs42@gmail.com>
2018-07-08 23:01:14 -04:00
Roberto Rosario
39a94f8b4f Update changelog.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-07-08 02:40:07 -04:00
Roberto Rosario
2e3ae3f78b Merge branch 'esclear/mayan-edms-patch-1' into merge_patch-1 2018-07-08 02:37:48 -04:00
Roberto Rosario
fd87e28113 French and Polish language translation updates.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-07-08 02:35:43 -04:00
Roberto Rosario
306b764a5c Update release notes for version 3.0.1
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-07-08 02:11:39 -04:00
Roberto Rosario
0987bbe0fa Pin javascript libraries to specific versions to avoid using potentianlly broken updates automatically. GitLab issue #486.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-07-08 01:09:34 -04:00
Roberto Rosario
7a2f7d81bc Install the locales package for the release linux image.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-07-08 01:00:58 -04:00
Roberto Rosario
64ac165f03 Stop install script on errors. Don't stop if previous containers or volumes don't exists. Fix hardcoded volumes.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-07-04 18:30:50 -04:00
Daniel Albert
8cea56aceb Fix string concatenation to fix error messages
Without using parentheses, the strings are not joined.
2018-07-02 20:57:45 +00:00
Roberto Rosario
aabd5651d8 Update the docker.stack file.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-07-02 00:43:42 -04:00
Roberto Rosario
29b680ef84 Fix GitLab issue #484. Thanks to @Bebef for the report and debug information.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-07-01 23:59:15 -04:00
Roberto Rosario
89a7b9d6b5 Change the way wizard steps are deregistered. Instead of deleting then from the _registry class dictionary they are filtered based on the _deregistry dictionary. This way de-registration can be reversed. Useful for tests.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-07-01 23:56:30 -04:00
Roberto Rosario
90b7c1ffa3 Tag and push a "latest" image too.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-06-30 03:41:11 -04:00
Roberto Rosario
be4365bbf7 Increase document image generation task timeout from 20 seconds to 120 seconds to allow more time for image generation on slow hardware like ARM SBCs.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-06-30 00:57:27 -04:00
Roberto Rosario
f8b50ab94b Improve script texts.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-06-30 00:47:28 -04:00
Roberto Rosario
bcf995b459 Default the installation of Docker to false.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-06-30 00:44:00 -04:00
Roberto Rosario
30957b24c4 Push the final docker image to the docker hub and add deploy stage for an online demo and a staging deployment.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-06-30 00:43:27 -04:00
Roberto Rosario
340eabc725 Include the version file in the final docker image.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-06-30 00:33:10 -04:00
Roberto Rosario
d8492f99ab Add docker deploy script.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-06-30 00:32:45 -04:00
Roberto Rosario
abe6d53c2c Merge branch 'versions/next' into master
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-06-29 03:19:13 -04:00
Roberto Rosario
9a809c493a Bump version to 3.0
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-06-29 03:15:34 -04:00
Roberto Rosario
aa38b1c0e8 PEP8 cleanups.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-06-29 03:10:17 -04:00
Roberto Rosario
7dd56bbf15 Sort language options.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-06-29 03:05:14 -04:00
Roberto Rosario
061366ffec Update apps' other modules to use the new Icon class.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-06-29 02:54:14 -04:00
Roberto Rosario
aa4e8e3507 Update the common, django_gpg, document_comments, document_indexing, document_parsing, document_signatures, document_states, event, linking, mailer, permissions, rest_api, smart_settings, sources and task manager apps to use the new Icon class.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-06-28 23:19:49 -04:00
Roberto Rosario
40d8c7049c Update the user management app to use the new Icon class.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-06-28 16:52:10 -04:00
Roberto Rosario
8f0ad91d96 Update the tags app to use the Icon class.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-06-28 16:47:34 -04:00
Roberto Rosario
f5e3470deb Update the OCR app to use the new Icon class.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-06-28 16:47:23 -04:00
Roberto Rosario
e0d812ac74 Finish converting the document app to use the new Icon class.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-06-28 16:34:31 -04:00
Roberto Rosario
85926ae8f8 The conditional_escape call caused downloaded OCR text to contain HTML entities like &quot;
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-06-28 02:04:49 -04:00
Roberto Rosario
c4c73666aa Update the build makefile target to use Debian instead of Alpine
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-06-28 01:22:50 -04:00
Roberto Rosario
fb845abf10 Further sanitize the template title text before making it the window title via JS.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-06-27 23:21:03 -04:00
Roberto Rosario
9dfe187202 Recalculate a document's indexes when attaching or removing a tag from or to it. Recalculate all of a tag's documents when a tag is about to be deleted.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-06-13 01:26:58 -04:00
Roberto Rosario
66e53bac22 Merge the license and packages license display form. Use Mayan's custom TextAreaDiv widget.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-06-12 21:38:34 -04:00
Roberto Rosario
60a3e1aa42 Update deployment instructions.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-06-12 21:24:50 -04:00
Roberto Rosario
e5e619e045 Only build docker images for the master, staging and nightly branches.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-06-12 03:54:46 -04:00
Roberto Rosario
53c17ce7ab No need to copy .pypirc just to build a package.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-06-12 03:52:48 -04:00
Roberto Rosario
694f7675e5 Use the passthrough manager to be able to show previews for trashed documents again.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-06-08 17:38:28 -04:00
Roberto Rosario
74a252afcf Rename the single document form download link from "Download" to "Advanced download".
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-06-08 00:02:42 -04:00
Roberto Rosario
46f593654c Add a "Quick download" link to reduce the number of steps required to download a single document. GitLab issue #338. Thanks to Michel Lavoie for the suggestion.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-06-08 00:00:16 -04:00
Roberto Rosario
96f5c28059 Update release notes.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-06-07 23:49:57 -04:00
Roberto Rosario
0f6d33140a Synchronize translation files.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-06-07 23:49:43 -04:00
Roberto Rosario
460570ed05 Don't provide a default for the scanner source adf_mode. Some scanners throw an error even when the selection if supported.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-06-07 20:58:50 -04:00
Roberto Rosario
3e58fd4e38 Update release notes.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-06-07 20:55:02 -04:00
Roberto Rosario
4d11234ba5 Fix error when trying to upload a document from and email account with 'from' and 'subject' metadata. Fix typo on message.header get from 'Suject' to 'Subject'. On multi part emails keep the original From and Subject properties for all subsequent parts if the sub parts don't specify them. Fixes issue #481. Thanks to Robert Schöftner @robert.schoeftner for the report and debug information.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-06-07 20:47:00 -04:00
Roberto Rosario
76513e7b38 Add instructions to dump a postgresql db to an sql text file.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-06-07 18:38:51 -04:00
Roberto Rosario
ac433d9651 Add sample backup and restore command for a PostgreSQL Docker container.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-06-07 17:24:51 -04:00
Roberto Rosario
2cc9339715 Fix typos.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-06-07 17:21:46 -04:00
Roberto Rosario
b8151f848a Example docker installation instructions.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-06-07 03:12:35 -04:00
Roberto Rosario
ca6d6f3fc7 Bump version to 3.0rc1
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-06-07 01:16:05 -04:00
Roberto Rosario
5e98c17601 Update docker compose sample file.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-06-05 03:42:55 -04:00
Roberto Rosario
854304d0c9 Update stack file.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-06-05 03:41:30 -04:00
Roberto Rosario
bdf2bfcd12 Create dummy makefile to avoid error for non existing docker/Makefile during build.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-06-05 03:41:22 -04:00
Roberto Rosario
e8798abc78 Update deployment and docker chapters.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-06-05 03:40:40 -04:00
Roberto Rosario
ec3fcbf5dd Reorganize and cleanup the Makefiles.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-06-05 02:16:02 -04:00
Roberto Rosario
530a055733 Documentation update.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-06-05 02:15:40 -04:00
Roberto Rosario
acea52400a Use the MAYAN_SETTINGS_MODULE instead of MAYAN_SETTINGS_FILE for consistency.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-06-05 02:14:11 -04:00
Roberto Rosario
b5a4a9cf45 Add a short version of the copyright package metadata for the documentation template.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-06-05 02:13:09 -04:00
Roberto Rosario
d1973e6e05 Explicitly set CELERY ALWAYS EAGER to False in the production setting file.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-06-05 02:12:28 -04:00
Roberto Rosario
6008c15610 Accept javascript management proposal as MERC-3.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-06-04 17:35:17 -04:00
Roberto Rosario
ed6a5c8ff7 Update README
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-06-03 14:49:24 -04:00
Roberto Rosario
d6232b4b28 Update the docker image entrypoint Pythonpath to use the top level media root folder.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-06-03 14:47:55 -04:00
Roberto Rosario
ffbac43293 Fix failing OCR test.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-06-03 14:42:55 -04:00
Roberto Rosario
76208022b9 Update documentation. Add docker chapter.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-06-03 04:06:01 -04:00
Roberto Rosario
df980292cb Change the media root settings folder name from 'settings' to 'mayan_settings' for clarity.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-06-03 03:00:32 -04:00
Roberto Rosario
66205c11d3 Add zlib and libjpeg symlinks to allow Pillow to install on armv7l (ODROID HC1)
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-06-03 02:59:50 -04:00
Roberto Rosario
124f68125d Update release notes.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-06-03 02:59:22 -04:00
Roberto Rosario
2ee73e12b4 Replace the DOCUMENTS_LANGUAGE_CHOICES setting option. Replaced with the new DOCUMENTS_LANGUAGE_CODES.
Reduce default language code choice from 7800 to the top 100 spoken languages and related (https://en.wikipedia.org/wiki/List_of_languages_by_number_of_native_speakers).

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-06-03 02:53:45 -04:00
Roberto Rosario
9896f7d52a Revert "Disable Docker test image from the CI pipeline.". Re add the Docker tests now that the slowdown cause was found to be Whitenoise.
This reverts commit e7637151b9.
2018-06-03 00:08:06 -04:00
Roberto Rosario
54e9808eb9 User a default secret key that shows the need to set one.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-06-02 21:51:01 -04:00
Roberto Rosario
f0bb633eee Move secret key and media root calculation code to the top of the settings file.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-06-02 21:49:58 -04:00
Roberto Rosario
6c3f5430b7 Use the base testing setting (disables Whitenoise) file when running tests from inside a Docker container.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-06-02 21:48:39 -04:00
Roberto Rosario
e524c3bd79 Remove transparent import of local.py
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-06-02 21:47:12 -04:00
Roberto Rosario
e48b85a392 Disable embedded signatute verification during the perform upgrade command.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-06-02 21:43:18 -04:00
Roberto Rosario
e2f95b4d48 Add COMMON_PRODUCTION_ERROR_LOGGING setting to control the logging of errors in production. Defaults to False. Change the error log file handle class to RotatingFileHandle to avoid an indefinitely growing log file.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-06-02 21:34:04 -04:00
Roberto Rosario
15badf4ff9 Update single and multiple document OCR submit views to use MultipleObjectConfirmActionView instead of the deprecated MultipleInstanceActionMixin.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-05-30 19:12:20 -04:00
Roberto Rosario
37d2f82b6d Remove runner tag from the sqlite test section.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-05-26 01:17:59 -04:00
Roberto Rosario
53c0ca20a5 Remove codecov CI stage
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-05-26 01:01:35 -04:00
Roberto Rosario
5d05b4ea7c Use list comprehension to disable the whitenoise runserver static server.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-05-25 03:24:27 -04:00
Roberto Rosario
2a3d4eedc8 Move whitenoise test disabling to base.py. Disable the whitenoise runserver app. Disable Manifest static storage.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-05-25 03:22:17 -04:00
Roberto Rosario
bf51ad3c8d Don't collect static files for tests.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-05-25 03:21:37 -04:00
Roberto Rosario
e7637151b9 Disable Docker test image from the CI pipeline.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-05-25 00:09:03 -04:00
Roberto Rosario
e4af58d4b7 Remove whitenoise from middlewares during test suit as it causes out of memory errors.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-05-24 23:35:11 -04:00
Roberto Rosario
1ea684737a Move SQLite setup as a fallback default the database manager setup block.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-05-24 23:34:04 -04:00
Roberto Rosario
39e605df11 Collect staticfiles before running tests for the CI.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-05-21 01:32:17 -04:00
Roberto Rosario
e7d99ff6dd Bump version of Docker image. Update the stack file.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-05-21 00:41:58 -04:00
Roberto Rosario
9c8326fd0e Fix issue with locale during packaging for test documents with unicode names. Add files to allow live testing.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-05-21 00:40:39 -04:00
Roberto Rosario
30238c20b6 Regenerate setup.py.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-05-21 00:40:13 -04:00
Roberto Rosario
9a5c281a8b Add support for running tests from a Docker container.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-05-21 00:39:40 -04:00
Roberto Rosario
047962d946 Improve how to determine when to install the package.json file using pathlib.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-05-21 00:38:05 -04:00
Roberto Rosario
7744dac423 Add the whitenoise.storage.CompressedManifestStaticFilesStorage class to allow for permanent cacheable static files.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-05-21 00:37:15 -04:00
Roberto Rosario
ba7716f23d Re-enable the support link.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-05-21 00:36:21 -04:00
Roberto Rosario
b41c932796 Improve the docker-shell target.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-05-21 00:35:59 -04:00
Roberto Rosario
e0d8eff711 Add the --no-javascript option to the initial setup to disable download the Javascript libraries.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-05-20 07:51:17 -04:00
Roberto Rosario
a734538170 Dump the gunicorn and redis logs to the console.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-05-20 07:50:36 -04:00
Roberto Rosario
f1ce12663e Add makefile target to connect to a Docker container and the set the console dimensions.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-05-20 07:49:32 -04:00
Roberto Rosario
160d8f94a9 Add package.json files to the Python manifest.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-05-20 07:49:01 -04:00
Roberto Rosario
45702548b6 Improve Javascript downloaded by adding semver comparison.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-05-20 07:48:17 -04:00
Roberto Rosario
83ec4761d9 Add sample docker swarm file.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-05-11 03:11:08 -04:00
Roberto Rosario
682fab24e8 Update changelog and release notes.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-05-10 18:00:04 -04:00
Roberto Rosario
199ffde283 Sane scanner source paper source now defaults to blank.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-05-10 17:52:55 -04:00
Roberto Rosario
bdd6849d83 Fix metadata edit form submit button icon.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-05-10 17:51:24 -04:00
Roberto Rosario
d560ec5df7 Update the GPG path for the tests.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-05-10 04:45:05 -04:00
Roberto Rosario
ec82738a47 Invert logic on when to start the local REDIS server. Use the Python binary path and not the dist-packages one. Don't create a pid file for celery beat, supervisor already does it. 2018-05-10 04:33:51 -04:00
Roberto Rosario
4833aaf17c Update SIGNATURES_GPG_PATH default value.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-05-10 04:33:24 -04:00
Roberto Rosario
b2b8549f8a Use variables for default values instead of literals.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-05-10 04:32:57 -04:00
Roberto Rosario
3612f6dbfb Ensure APT_PROXY is read. Install GPG version 1.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-05-10 04:32:31 -04:00
Roberto Rosario
6c04e7dbd6 Call manage.py using python and not directly.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-05-07 01:52:54 -04:00
Roberto Rosario
f410ae40e7 Split test jobs into multiple jobs. Cache the APT cache folder. Only submit coverage report in the SQLite test jobs.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-05-07 01:45:35 -04:00
Roberto Rosario
b7b100b01a Fix docker build stage keys.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-05-07 01:31:53 -04:00
Roberto Rosario
ea4886dc2b Update the key names of the docker build stage.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-05-07 01:15:20 -04:00
Roberto Rosario
fc42849b00 Update gitlab-ci to build a docker image if the tests are successful.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-05-07 01:08:47 -04:00
Roberto Rosario
188b7559d2 Cache the PIP folder between builds.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-05-07 00:48:59 -04:00
Roberto Rosario
ae9a519263 Don't create an __init__.py file in the media folder. Replace error number literals with constant definitions.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-05-04 00:49:42 -04:00
Roberto Rosario
55359c72cf Unify supervisor configuration files. Lower nice levels of most workers. Merge OCR and slow workers. Lower gunicorn workers to 2. Call all supervisor processes using a shell to expand the install and mayan binary locations and avoid hardcoding.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-05-04 00:48:03 -04:00
Roberto Rosario
9fad6c37bf Fix process name for the OCR worker.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-04-30 05:13:01 -04:00
Roberto Rosario
1693b36b2d Only try to return notifications for logged in users.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-04-30 05:12:37 -04:00
Roberto Rosario
55879d3488 Add default celery settings to docker's entrypoint script.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-04-30 05:00:02 -04:00
Roberto Rosario
d610f8d5f6 Use the errno library and not the literal error numbers.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-04-30 02:01:06 -04:00
Roberto Rosario
b4d1ce33e5 Don't enable or defile the logfile handler if the media folder doesn't exist.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-04-30 02:00:33 -04:00
Roberto Rosario
9cde4d7b04 Use double quotes since single quotes are used in the 500 string.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-04-30 01:47:31 -04:00
Roberto Rosario
4db641372d Test againg MySQL 8.0.3. Since 8.0.4 onwards the authentication system changed.
https://stackoverflow.com/questions/49963383/authentication-plugin-caching-sha2-password

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-04-30 01:08:43 -04:00
Roberto Rosario
5c83cff767 Use django-environ for DEBUG and CELERY_ALWAYS_EAGER. Default CELERY_ALWAYS_EAGER to True.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-04-29 23:47:27 -04:00
Roberto Rosario
3689df4aac Better default for the testing error log file full path.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-04-29 23:32:22 -04:00
Roberto Rosario
cbad7ee504 Print the exception type on upgrade errors. This is used for celery errors which don't include a text message.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-04-29 23:30:05 -04:00
Roberto Rosario
441127ae45 Don't create the media folder in the common app if it doesn't exist. Instead disable logfile creation.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-04-29 23:19:12 -04:00
Roberto Rosario
a788a99d93 Set CELERY_ALWAYS_EAGER to True on the development setting file.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-04-29 23:14:55 -04:00
Roberto Rosario
430c7b8c14 Add verbose error reporting when the document upload task fails.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-04-29 23:12:24 -04:00
Roberto Rosario
83ca7a7476 Add missing migrations.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-04-29 03:59:39 -04:00
Roberto Rosario
2ef31d2ec3 Rename shared upload storage from sharedupload_storage to storage_sharedupload
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-04-29 03:58:56 -04:00
Roberto Rosario
018c641e8b Create the media folder if is doesn't exist.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-04-28 23:16:13 -04:00
Roberto Rosario
78961bec49 Remove sentry specifig code from the 500.html template.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-04-28 19:47:57 -04:00
Eric Riggs
8ee45162aa Revert workers to prefork method
Signed-off-by: Eric Riggs <ericriggs42@gmail.com>
2018-04-26 03:54:59 -04:00
Eric Riggs
a84568574f Replace ubuntu with debian
Signed-off-by: Eric Riggs <ericriggs42@gmail.com>
2018-04-26 03:54:40 -04:00
Eric Riggs
f3c86ada45 - Lower concurrency of workers to 1
- Change process type to gevent

Signed-off-by: Eric Riggs <ericriggs42@gmail.com>
2018-04-26 02:19:09 -04:00
Eric Riggs
3145cb4231 Add django-environ and use it to set ALLOWED_HOSTS.
Signed-off-by: Eric Riggs <ericriggs42@gmail.com>
2018-04-26 02:18:32 -04:00
Eric Riggs
d97b080586 Flanker is not thread safe, hide the import until it is actually needed.
Signed-off-by: Eric Riggs <ericriggs42@gmail.com>
2018-04-26 02:17:33 -04:00
Eric Riggs
4f801154aa Manually link libjpeg and libzlib on aarch64.
Signed-off-by: Eric Riggs <ericriggs42@gmail.com>
2018-04-25 20:57:12 -04:00
Eric Riggs
9fbedd244c - Put the log file in the /tmp folder.
- This is temporary and should be fixed. Create /media when not found?

Signed-off-by: Eric Riggs <ericriggs42@gmail.com>
2018-04-22 13:51:14 -04:00
Eric Riggs
8e3446c13e Add g++
Signed-off-by: Eric Riggs <ericriggs42@gmail.com>
2018-04-22 13:50:19 -04:00
Eric Riggs
27d84bea5a - Add missing build libraries.
- Clean up some files.

Signed-off-by: Eric Riggs <ericriggs42@gmail.com>
2018-04-22 12:58:47 -04:00
Eric Riggs
077910bf72 Add gunicorn, gevent and whitenoise as requirements
Signed-off-by: Eric Riggs <ericriggs42@gmail.com>
2018-04-22 04:18:09 -04:00
Eric Riggs
455fcef114 Move Docker environment overrides to main base.py module
Signed-off-by: Eric Riggs <ericriggs42@gmail.com>
2018-04-22 04:17:28 -04:00
Eric Riggs
bbc338120e Make all storage location explicit children of MEDIA_ROOT.
Signed-off-by: Eric Riggs <ericriggs42@gmail.com>
2018-04-22 04:16:19 -04:00
Eric Riggs
d8941ea810 - Add --force option to initialsetup
- Create the entire media structure

Signed-off-by: Eric Riggs <ericriggs42@gmail.com>
2018-04-22 04:14:46 -04:00
Eric Riggs
f1ed40adba Merge Docker files back into main repo.
Signed-off-by: Eric Riggs <ericriggs42@gmail.com>
2018-04-22 04:14:07 -04:00
Roberto Rosario
238595e1bc Don't error out if it is not possible to check for the latest current version.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-04-16 17:08:22 -04:00
Roberto Rosario
222037daa9 Add known issues section about flanker warnings.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-04-16 15:26:01 -04:00
Roberto Rosario
2a3b37cbf7 Update roadmap.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-04-16 15:25:45 -04:00
Roberto Rosario
2604a22772 Update roadmap.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-04-16 15:20:50 -04:00
Roberto Rosario
6a65544fb7 Remove some label argument from the apps module and move them to the model.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-04-16 15:20:45 -04:00
Roberto Rosario
6839f1b529 Make the 'label' argument of SourceColumn optional and introspect its value from the model meta if not specified.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-04-16 15:19:16 -04:00
Roberto Rosario
e2058f91c1 Move import to the top of the file.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-04-13 16:18:09 -04:00
Roberto Rosario
3e062a5517 New initialization command. Creates media/system and populates the SECRET_KEY and VERSION files.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-04-13 16:05:40 -04:00
Roberto Rosario
b165b9a5f2 New environment variables to configure the secret key, database, and celery options. The secret key can also be read from a file. Stricter defaults to increase security.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-04-13 16:02:16 -04:00
Roberto Rosario
aa13953326 Fix typo.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-04-13 15:54:37 -04:00
Roberto Rosario
c482bb604c Add better explanation when a .local.py setting import error occurs.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-04-13 15:53:00 -04:00
Roberto Rosario
a7f4dc2f10 Add flake8 step to the release checklist.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-04-12 18:59:19 -04:00
Roberto Rosario
6a3bb455b4 Update release notes.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-04-11 22:32:15 -04:00
Roberto Rosario
ad351a1368 Add test for the POP3 email source model.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-04-11 22:23:04 -04:00
Roberto Rosario
eb2c7c6f34 Sort email sources models.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-04-11 22:22:45 -04:00
Roberto Rosario
2a77078022 Capture menu resolution errors on invalid URLs. Closes GitLab issue #420.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-04-11 21:38:27 -04:00
Roberto Rosario
be73264341 Production ALLOWED_HOSTS settings now defaults to a safer ['127.0.0.1', 'localhost', '[::1]']
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-04-11 20:41:25 -04:00
Roberto Rosario
59d958982f Don't disable existing loggers.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-04-11 20:39:56 -04:00
Roberto Rosario
f7ca35c9b6 Download and compile translations from Transifex.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-04-11 20:39:30 -04:00
Roberto Rosario
0641b568ee Update translation sources and compiled files.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-04-11 15:18:50 -04:00
Roberto Rosario
44d0198c6f Update release notes.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-04-11 12:54:26 -04:00
Roberto Rosario
c828c3acd9 Add missing month entry.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-04-11 12:54:10 -04:00
Roberto Rosario
b9c51792d1 Add icons.py module for the acls, authentication, cabinets, checkouts, some of common, mayan_statistic, and metadata apps links.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-04-11 04:17:45 -04:00
Roberto Rosario
b2815ad30b Update release notes.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-04-11 04:17:27 -04:00
Roberto Rosario
05aa1fc038 Add support for icon drivers. Add a driver for Font Awesome.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-04-11 04:16:57 -04:00
Roberto Rosario
bce5411ea7 Fix typos.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-04-10 21:22:25 -04:00
Roberto Rosario
8ba3b71d1c Change version to 3.0b1.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-04-10 17:58:28 -04:00
Roberto Rosario
8496ea7072 Add support for HTML bodies to the user mailers. Closes GitLab issue #470.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-04-10 17:54:43 -04:00
Roberto Rosario
3484dc8f33 Update translation source and compiled files.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-04-10 04:23:16 -04:00
Roberto Rosario
b5d79f42a9 Add the option to enable or disable parsing when uploading a document for each document type. Add a new setting option to enable automatic parsing for each new document type created.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-04-10 04:02:41 -04:00
Roberto Rosario
74628ab04b Improve the document base test case for models and for views. Add document test mixin.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-04-10 04:00:05 -04:00
Roberto Rosario
d534dfe65b Show the SQLite warning when the DEBUG variable is False.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-04-10 03:11:23 -04:00
Roberto Rosario
64ad07d95d Add locking for interval sources. This reduces the chance of repeated documents from long running email downloads.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-04-10 02:26:06 -04:00
Roberto Rosario
3618778737 Email source code cleanups. Use the header variable returned from flanker to extract the sender and the subject. Remove unsed scanimage usage via sh.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-04-10 01:52:47 -04:00
Roberto Rosario
07444f0688 Update release notes.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-04-10 01:22:21 -04:00
Roberto Rosario
63a77d0235 Use Mailgun's flanker library to process the email sources.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-04-10 01:16:53 -04:00
Roberto Rosario
3909481205 Update release notes.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-04-10 01:01:47 -04:00
Roberto Rosario
13f1730dda Add warning when using SQLite as the database backend.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-04-09 03:48:47 -04:00
Roberto Rosario
27a257f010 PEP8 cleanups.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-04-08 04:12:14 -04:00
Roberto Rosario
440f96c75b Update release notes regarding CAAs.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-04-08 04:05:47 -04:00
Roberto Rosario
a8043e9560 Add individual and entity contributor assignment agreements. GitLab issue #459.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-04-08 03:58:18 -04:00
Roberto Rosario
668f15fab8 Fix failing test.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-04-08 02:48:32 -04:00
Roberto Rosario
2a61328e7b Detect if a base_plain template was loaded via AJAX and refresh the screen to make it top level.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-04-08 02:29:45 -04:00
Roberto Rosario
12fce15d14 Fix indentation.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-04-08 02:29:25 -04:00
Roberto Rosario
90623ed372 Update rendering of the readonly multiselect widget to conform to Django's updated field class interface.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-04-06 16:44:46 -04:00
Roberto Rosario
bbd7704e2e Improve rendering of the details form.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-04-06 16:17:30 -04:00
Roberto Rosario
d9f0caeee7 Update release notes closed issues.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-04-06 03:25:15 -04:00
Roberto Rosario
29ca2f731e Update release notes.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-04-06 03:21:29 -04:00
Roberto Rosario
694b3dd629 Add document page API test case.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-04-06 02:57:52 -04:00
Roberto Rosario
6e59c8d749 Use a randomly generated temporary directory as the destination for downloading javascript packages.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-04-06 02:15:42 -04:00
Roberto Rosario
7fe5f22770 Make error messages persistent and increase the timeout of warning to 10 seconds.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-04-06 02:11:06 -04:00
Roberto Rosario
1f059dbb5d Remove all running workflow instances from documents whose type is removed from the workflow type. This avoid having orphaned workflows running.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-04-06 02:09:05 -04:00
Roberto Rosario
7b38cffd85 Fix typo
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-04-06 02:03:46 -04:00
Roberto Rosario
d7ecdac6b0 Fix PEP8 warnings.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-04-06 01:26:06 -04:00
Roberto Rosario
e525dfffcd Add test for the document type quick label list view. Modernize the document type and quick label views tests.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-04-06 01:15:07 -04:00
Roberto Rosario
12a2d54f35 Fix the document type quick label list view.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-04-06 01:14:41 -04:00
Roberto Rosario
b77c7bba30 Make document type creation optional but default to true in the generic document view test base class.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-04-06 01:13:59 -04:00
Roberto Rosario
b0c2d6cd76 Allow ObjectListPermissionFilterMixin to check access against a parent object and not just against the queryser of child objects.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-04-06 01:13:10 -04:00
Roberto Rosario
e35cde1f6c Add item counter to the document fancybox previewer.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-04-05 20:26:33 -04:00
Roberto Rosario
89d72da92c Add missing thumbnail size to the thumbnail render template.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-04-05 20:26:05 -04:00
Roberto Rosario
60fb00ff2d Fix issue when using workflows transitions with the new version upload event as trigger. Thanks to Sema @Miggaten for the find and the solution.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-04-05 19:57:26 -04:00
Roberto Rosario
ebe9633665 Auto upload a document when using the generic document test case but give subclasses the choice to disable it.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-04-05 19:47:29 -04:00
Roberto Rosario
99c4f2ccfb Use the document image generation task to create the images for the OCR.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-04-05 19:31:55 -04:00
Roberto Rosario
da5445eef9 Rename the storages instance names for consistency.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-04-05 19:30:59 -04:00
Roberto Rosario
1d55e67b00 Create the document image cache file it is doesn't exist.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-04-05 19:15:27 -04:00
Roberto Rosario
a0b7561ed7 Add support for passing arguments to the OCR backend.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-04-05 17:23:32 -04:00
Roberto Rosario
46b38b30d7 Give the error logger the correct type of argument.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-04-05 17:18:01 -04:00
Roberto Rosario
97d39b3336 Ensure the events are returned in the correct order as these are from an outside package.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-04-05 17:16:09 -04:00
Roberto Rosario
c7c5df1190 Remove warning of workflow triggers being experimental.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-04-05 14:48:08 -04:00
Roberto Rosario
41ed852822 Allow passing an argument to the runserver and runserver_plus makefile targets.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-04-05 07:21:58 -04:00
Roberto Rosario
c234a65a7b Add support to install javascript libraries for just one. Don't truncate version string. Don't download required dependencies by default.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-04-05 07:21:18 -04:00
Roberto Rosario
ae2297b0bd Update the tag widget for Django 1.11.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-04-05 07:19:39 -04:00
Roberto Rosario
c46a2cd372 Remove more included javascript libraries to be downloaded.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-04-05 07:18:23 -04:00
Roberto Rosario
049342def2 Remove the dropzone package and create entries to use the JavaScript manager.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-04-05 03:38:06 -04:00
Roberto Rosario
a6791d41f8 Display a confirmation message when statistics are queued.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-04-05 03:30:22 -04:00
Roberto Rosario
096935c826 Move all the document statistics code to the documents.statistics module. Add month names to the statistics.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-04-05 03:29:46 -04:00
Roberto Rosario
b7b1a87f23 Add JavaScript manager.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-04-05 03:29:28 -04:00
Roberto Rosario
94bdea3c69 Update Chart.js version. Improve line chart appearance.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-04-05 03:19:05 -04:00
Roberto Rosario
4c1e1f0fb1 Tweak the document page list view columns CSS to improve panel display width.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-04-03 18:50:58 -04:00
Roberto Rosario
3b13713295 Expand note about user event listing. Closes GitLab issue #437.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-04-03 18:38:40 -04:00
Roberto Rosario
0207018547 Resize the document thumbnails via CSS while preserving the aspect ratio.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-04-03 17:46:04 -04:00
Roberto Rosario
b4b8d9403c Pass alternate column classes to the cabinet, index and tags document list views to improve the rendered size of the document panels.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-04-03 17:44:50 -04:00
Roberto Rosario
2677ece123 Allow passing alternate CSS classes to the list item template columns.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-04-03 17:44:13 -04:00
Roberto Rosario
4b23d30fa6 Fix document indexing icon class.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-04-03 17:43:49 -04:00
Roberto Rosario
93a1a436a7 Fix checkbox widget not being rendered in some cases.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-04-03 17:43:18 -04:00
Roberto Rosario
bad90c9848 Add smart checkbox selector. Code donated by the Paperattor project (www.paperattor.com).
Unify checkbox selection code for list items and table items.
Move some javascript initialization to the root template.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-04-03 04:32:47 -04:00
Roberto Rosario
5fa0dc8d0d Reorganize the way the document print view checks for permission to move permission checking to the dispatch method.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-04-03 04:05:19 -04:00
Roberto Rosario
fc560fe63a Remove workflow states experimental feature warning message.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-04-03 04:00:55 -04:00
Roberto Rosario
1248908f1f Update copyright years.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-04-03 03:58:12 -04:00
Roberto Rosario
988e6227cc Update about view. Remove support link.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-04-03 03:57:25 -04:00
Roberto Rosario
9ec7fa7f93 Sort permissions in the ACL edit view and copy solution to improve the role permission sorting.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-04-03 03:21:35 -04:00
Roberto Rosario
a1568be7a7 Add missing migrations.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-04-03 03:12:22 -04:00
Roberto Rosario
f850d0ea1b Add release note entry for the storage driver arguments change.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-04-03 03:11:53 -04:00
Roberto Rosario
045056dc46 Move image container height control to the document image template.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-04-03 02:53:57 -04:00
Roberto Rosario
9e8cd4d3d7 Fix the migrations storage class name.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-04-03 02:48:39 -04:00
Roberto Rosario
bb7caa3c10 Merge remote-tracking branch 'origin/feature/storages' into merge-test 2018-04-03 02:43:24 -04:00
Roberto Rosario
271838888c Update the old filebasedstorage imports in migrations to use Django's default file storage.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-04-03 02:37:37 -04:00
Michael Price
424d6a5af9 Standardize the way storages are used. All apps that use storage now define their storages in the .storages modules instead of the .runtime module. The storage.backends.filebasedstorage.FileBasedStorage has been remove, instead Django's default storage is used and each app is responsible of specifying their default path.
Signed-off-by: Michael Price <loneviking72@gmail.com>
2018-04-03 02:32:28 -04:00
Michael Price
1076d5f1ff Remove the setting STORAGE_FILESTORAGE_LOCATION. Document storage location for the storage.backend.filebasedstorage.FileBasedStorage backdend must now passed via the DOCUMENTS_STORAGE_BACKEND_ARGUMENTS, DOCUMENTS_CACHE_STORAGE_BACKEND_ARGUMENTS, or SIGNATURES_STORAGE_BACKEND_ARGUMENTS if the backend is used to documents, the document image cache and/or document signatures. Use DOCUMENTS_STORAGE_BACKEND_ARGUMENTS = '{ location: <specific_path> }' If no path is specified the backend will default to 'mayan/media/document_storage'.
Signed-off-by: Michael Price <loneviking72@gmail.com>
2018-04-03 02:27:56 -04:00
Michael Price
f9b7012389 Support passing arguments to the document, document cache and document signatures storage backends. New settings: DOCUMENTS_STORAGE_BACKEND_ARGUMENTS, DOCUMENTS_CACHE_STORAGE_BACKEND_ARGUMENTS, SIGNATURES_STORAGE_BACKEND_ARGUMENTS
Signed-off-by: Michael Price <loneviking72@gmail.com>
2018-04-03 02:25:43 -04:00
Roberto Rosario
0667519052 Control the maximum height of the document thumbnail to avoid to much breakage in the panel appearances.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-04-03 02:06:35 -04:00
Roberto Rosario
123acdd795 Update release notes.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-04-03 02:03:58 -04:00
Roberto Rosario
fb2ba25f23 Remove the data filters feature.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-04-03 01:40:34 -04:00
Roberto Rosario
0bc6a42192 Improve the way missing migrations are check. GitLab issue #278.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-04-03 01:21:49 -04:00
Roberto Rosario
ed5d7cd812 Close GitLab issue #302 'New Document' button available to users who do not have permission.
Thanks to kg @kgraves.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-04-03 01:13:59 -04:00
Roberto Rosario
92bd82320b Update volatile permission accesor. From property to method.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-04-03 00:39:30 -04:00
Roberto Rosario
dc6eb77f43 Add missing changes to the 3.0 release notes.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-04-03 00:36:41 -04:00
Roberto Rosario
68d96fae7e Update the role permission edit view require the permission grant or permission revoke permissions for the selected role.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-04-03 00:35:09 -04:00
Roberto Rosario
a5856da810 Turn off DEBUG for the development test setting file to avoid filling the screen with debug messages during testing.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-04-03 00:19:24 -04:00
Roberto Rosario
73ec2f0fed Fix issue #454. Thanks to Andrei Korostelev @kindkaktus for the issue and the solution.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-04-03 00:19:05 -04:00
Roberto Rosario
f86acd07a4 Remove extra quote in first time login panel.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-04-02 05:08:21 -04:00
Roberto Rosario
887bb3f718 Delete repeated template.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-04-02 05:02:39 -04:00
Roberto Rosario
1d3ca382aa Invert the columns in the ACL detail view.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-04-02 04:57:48 -04:00
Roberto Rosario
db235a7e78 Add support for users ACLs. Add support for groups ACLs.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-04-02 04:53:03 -04:00
Roberto Rosario
27bca4c438 Sort permission namespaces and permissions in the role permission views.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-04-02 04:45:10 -04:00
Roberto Rosario
7fb3828d77 Fix the list sub template multi item checkbox selection.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-04-02 04:38:15 -04:00
Roberto Rosario
cf99201b89 Add support for Role ACLs.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-04-02 02:36:20 -04:00
Roberto Rosario
57e7722f59 Don't show documents with 0 duplicates in the duplicated document list.
Also clean up the duplicated document model after a document is deleted.
Fix queue name typo.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-04-02 01:45:30 -04:00
Roberto Rosario
010d56bda9 Add check_readme target to the Makefile documentation.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-04-02 00:42:54 -04:00
Roberto Rosario
cac19ec614 Fix release note formatting.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-04-02 00:42:42 -04:00
Roberto Rosario
7a6ac5d794 Update pending work.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-04-02 00:39:14 -04:00
Roberto Rosario
bcdc419b66 Update documentation and logos.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-04-02 00:34:08 -04:00
Roberto Rosario
0e4c1dd75a Fix project name in Makefile.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-04-02 00:33:12 -04:00
Roberto Rosario
b06918c333 Make detection and fixing of PDF orientation as experimental and
default it to being disabled.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-04-01 23:59:27 -04:00
Roberto Rosario
7e8868ea80 Unify changelogs and release notes.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-04-01 23:50:55 -04:00
Roberto Rosario
c3f00069c9 Remove and re-add conflicting migrations.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-04-01 23:42:37 -04:00
Roberto Rosario
cd267d0f1a Manual merge of commit d33859917a2eb7697a849f6aacfd8614bcb0dd91
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-04-01 20:53:33 -04:00
Michael Price
a3e602a670 Update release notes.
Signed-off-by: Michael Price <loneviking72@gmail.com>
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-04-01 20:51:53 -04:00
Michael Price
c64cdea754 Update HISTORY file.
Signed-off-by: Michael Price <loneviking72@gmail.com>
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-04-01 20:50:39 -04:00
Michael Price
91ee905843 Remove debug statements.
Signed-off-by: Michael Price <loneviking72@gmail.com>
2018-04-01 20:49:17 -04:00
Michael Price
53239385ae Add the "to=" keyword argument to all ForeignKey, ManayToMany and OneToOne Fields.
Signed-off-by: Michael Price <loneviking72@gmail.com>
2018-04-01 20:49:04 -04:00
Michael Price
038cd30960 Display the project's name in the first time login panel.
Signed-off-by: Michael Price <loneviking72@gmail.com>
2018-04-01 20:48:54 -04:00
Roberto Rosario
6dcc6dbd30 Manual merge of commit 7d523250dd681292ed08fbcdc87574344918aa43
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-04-01 20:48:23 -04:00
Roberto Rosario
da49c64095 Sync code with commit 522276c96deadc0af26ee9d7d17bed2cce91e493
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-04-01 20:46:39 -04:00
Eric Riggs
8cd7779b14 - Fix carousel item height issues.
- Place the page number summary at the bottom of the carousel pages.

Signed-off-by: Eric Riggs <ericriggs42@gmail.com>
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-04-01 20:45:14 -04:00
Michael Price
30fd0a397f Add Makefile target to check the format of the README.rst file.
Signed-off-by: Michael Price <loneviking72@gmail.com>
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-04-01 20:44:30 -04:00
Michael Price
fe242c3039 Fix version name of the latest version.
Signed-off-by: Michael Price <loneviking72@gmail.com>
2018-04-01 20:42:25 -04:00
Michael Price
9b08cf221a Update release checklist with entry to check the README.rst format.
Signed-off-by: Michael Price <loneviking72@gmail.com>
2018-04-01 20:42:11 -04:00
Michael Price
0ef05ad4e3 Fix HISTORY file formatting.
Signed-off-by: Michael Price <loneviking72@gmail.com>
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-04-01 20:41:30 -04:00
Michael Price
a6ca3f211e Update documentation overview animation.
Signed-off-by: Michael Price <loneviking72@gmail.com>
2018-04-01 20:39:43 -04:00
Michael Price
59c8bbdf2b Don't error out when trying to view the index instance list and none has been recalculated.
Signed-off-by: Michael Price <loneviking72@gmail.com>
2018-04-01 20:39:09 -04:00
Michael Price
1b8333a7f8 Add missing parenthesis. Fix formatting.
Signed-off-by: Michael Price <loneviking72@gmail.com>
2018-04-01 20:38:58 -04:00
Eric Riggs
0fbfb17d83 Detect Django's debug mode and render the server side error page properly.
Signed-off-by: Eric Riggs <ericriggs42@gmail.com>
2018-04-01 20:37:42 -04:00
Michael Price
d2eef74bb8 Update the name of the Makefile targets used for staging testing. Add target to build the project using Alpine Docker.
Signed-off-by: Michael Price <loneviking72@gmail.com>
2018-04-01 20:37:34 -04:00
Michael Price
0ecb2260e0 Update setting files used for staging testing.
Signed-off-by: Michael Price <loneviking72@gmail.com>
2018-04-01 20:36:59 -04:00
Michael Price
4c1ae55410 Update compiled translation files.
Signed-off-by: Michael Price <loneviking72@gmail.com>
2018-04-01 20:36:52 -04:00
Michael Price
59d746db97 Update translation source files.
Signed-off-by: Michael Price <loneviking72@gmail.com>
2018-04-01 20:36:45 -04:00
Michael Price
15115a51bf Update release notes.
Signed-off-by: Michael Price <loneviking72@gmail.com>
2018-04-01 20:36:18 -04:00
Michael Price
a3aa3fb0b5 Update code statistics.
Signed-off-by: Michael Price <loneviking72@gmail.com>
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-04-01 20:36:04 -04:00
Roberto Rosario
fed7921cdf Sync code with commit e4a0d1281236a3cd218f2559d11ea10814d6a4d2
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-04-01 20:34:59 -04:00
Michael Price
57325bc6ad Add release notes for version 3.0. Fix documentation formatting. Add upload wizard step chapter. Improve and add additional diagrams. Change documenation theme to rtd.
Signed-off-by: Michael Price <loneviking72@gmail.com>
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-04-01 20:33:09 -04:00
Michael Price
a9e8076abe Add wizard step to insert the document being uploaded to a cabinet.
Signed-off-by: Michael Price <loneviking72@gmail.com>
2018-04-01 20:31:21 -04:00
Michael Price
9abe4e8f96 Don't re-sort wizard steps, breaks number ordering. Detect adding new steps with the same name or number. Add support for deregister exiting steps.
Signed-off-by: Michael Price <loneviking72@gmail.com>
2018-04-01 20:31:14 -04:00
Michael Price
cc96ae0a09 Remove line between import of the same module.
Signed-off-by: Michael Price <loneviking72@gmail.com>
2018-04-01 20:31:07 -04:00
Michael Price
62bb9e80d9 Not need to add a tearDown method, this is done by the base class.
Signed-off-by: Michael Price <loneviking72@gmail.com>
2018-04-01 20:31:00 -04:00
Michael Price
31c9282d87 Repurpose the source app upload test with metadata as a metadata wizard step test.
Signed-off-by: Michael Price <loneviking72@gmail.com>
2018-04-01 20:30:50 -04:00
Michael Price
e9a365333f Rename the request_data variable to querystring for clarity. Turn the querystring into an IRI to support international characters in metadata values and allow JSON serializer for Celery.
Signed-off-by: Michael Price <loneviking72@gmail.com>
2018-04-01 20:30:40 -04:00
Michael Price
b200438c4e Add test for the tag app wizard step.
Signed-off-by: Michael Price <loneviking72@gmail.com>
2018-04-01 20:30:33 -04:00
Michael Price
05966afe1e Move post document upload processing of metadata and tags from sources.model to each wizard step.
Signed-off-by: Michael Price <loneviking72@gmail.com>
2018-04-01 20:30:25 -04:00
Michael Price
460d747424 Add new WizardStep class to decouple the wizard step configuration.
Signed-off-by: Michael Price <loneviking72@gmail.com>
2018-04-01 20:30:10 -04:00
Michael Price
a23f26f4f4 Return to the same source view after uploading a document.
Signed-off-by: Michael Price <loneviking72@gmail.com>
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-04-01 20:30:00 -04:00
Michael Price
8ecd9a31c8 Remove the license information for animate.css.
Signed-off-by: Michael Price <loneviking72@gmail.com>
2018-04-01 20:29:00 -04:00
Michael Price
c7fda3447c Unify the way to gather the project's metadata.
Signed-off-by: Michael Price <loneviking72@gmail.com>
2018-04-01 20:28:52 -04:00
Michael Price
eb5bd252db Move the page count display to the top of the image.
Signed-off-by: Michael Price <loneviking72@gmail.com>
2018-04-01 20:28:29 -04:00
Michael Price
bd5fe1af10 Update HISTORY file.
Signed-off-by: Michael Price <loneviking72@gmail.com>
2018-04-01 20:28:08 -04:00
Michael Price
79c1b761d4 Add the path to the defaul open api path. Display models closed by default.
Signed-off-by: Michael Price <loneviking72@gmail.com>
2018-04-01 20:28:01 -04:00
Michael Price
26fe832bd9 Move openapi_info definition to the rest_api app.
Signed-off-by: Michael Price <loneviking72@gmail.com>
2018-04-01 20:27:54 -04:00
Michael Price
de65d96fe2 Update cabinets and document_index api views docstrings. Update multi level docstrings as per Python best practices.
Signed-off-by: Michael Price <loneviking72@gmail.com>
2018-04-01 20:27:45 -04:00
Michael Price
f44fbe5687 Update drf-yasg to version 1.5.0.
Signed-off-by: Michael Price <loneviking72@gmail.com>
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-04-01 20:27:37 -04:00
Michael Price
75542ebcc3 Update required Django version to 1.11.11.
Signed-off-by: Michael Price <loneviking72@gmail.com>
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-04-01 20:26:43 -04:00
Michael Price
6c4ec805dc Move generate_setup back to the root directory. Doesn't work in a subfolder.
Signed-off-by: Michael Price <loneviking72@gmail.com>
2018-04-01 20:26:02 -04:00
Michael Price
6c738793fd Add more pending tasks.
Signed-off-by: Michael Price <loneviking72@gmail.com>
2018-04-01 20:25:55 -04:00
Michael Price
5fadeadce2 Add missing migrations.
Signed-off-by: Michael Price <loneviking72@gmail.com>
2018-04-01 20:25:48 -04:00
Michael Price
942dd7f710 Update HISTORY file.
Signed-off-by: Michael Price <loneviking72@gmail.com>
2018-04-01 20:25:12 -04:00
Michael Price
3159a6bf1f Remove ununsed library. Remove unused code. Fix formatting.
Signed-off-by: Michael Price <loneviking72@gmail.com>
2018-04-01 20:25:05 -04:00
Michael Price
6ecd12d250 Update code statistics.
Signed-off-by: Michael Price <loneviking72@gmail.com>
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-04-01 20:24:55 -04:00
Michael Price
c69147bdc5 Checking for access also checks for permission. Remove reduntant check.
Signed-off-by: Michael Price <loneviking72@gmail.com>
2018-04-01 20:24:11 -04:00
Michael Price
0c4a52558b Sort comment view method as per Mayan's best practices.
Signed-off-by: Michael Price <loneviking72@gmail.com>
2018-04-01 20:24:04 -04:00
Michael Price
3fc9a14015 Add document comment API tests to check with and without access. Update tests to latest API test class interface.
Signed-off-by: Michael Price <loneviking72@gmail.com>
2018-04-01 20:23:57 -04:00
Michael Price
5d2d821c6e Permission checking is done implicitly when checking for access. Remove the redundant check.
Signed-off-by: Michael Price <loneviking72@gmail.com>
2018-04-01 20:23:51 -04:00
Eric Riggs
a4f5febf38 Emulate the CTRL+click behavior.
Signed-off-by: Eric Riggs <ericriggs42@gmail.com>
2018-04-01 20:23:42 -04:00
Michael Price
ee3683f6ac Update pending tasks.
Signed-off-by: Michael Price <loneviking72@gmail.com>
2018-04-01 20:23:20 -04:00
Michael Price
ed8cdb9da4 Fix failing document parsing tests.
Signed-off-by: Michael Price <loneviking72@gmail.com>
2018-04-01 20:23:13 -04:00
Eric Riggs
ed4f97cea7 Push the last URL + query when rendering a form's new markup.
Signed-off-by: Eric Riggs <ericriggs42@gmail.com>
2018-04-01 20:23:07 -04:00
Michael Price
53b47455d3 Add support for OR type searches. Use the "OR" string between the terms. Example: term1 OR term2.
Signed-off-by: Michael Price <loneviking72@gmail.com>
2018-04-01 20:23:01 -04:00
Michael Price
af85d37307 Remove documents model TODOs
Signed-off-by: Michael Price <loneviking72@gmail.com>
2018-04-01 20:22:51 -04:00
Michael Price
1fc06a350b Consolidate the docstring of the API methods into a class docstring.
Signed-off-by: Michael Price <loneviking72@gmail.com>
2018-04-01 20:22:35 -04:00
Michael Price
ff9e291cd7 Re-enable the API root path and exclude it from schema introspection.
Signed-off-by: Michael Price <loneviking72@gmail.com>
2018-04-01 20:22:26 -04:00
Michael Price
17acb444bd Add link to API documentation generated by ReDoc.
Signed-off-by: Michael Price <loneviking72@gmail.com>
2018-04-01 20:22:21 -04:00
Michael Price
d173f9f863 Disable the root API path as this confuses Swagger which then groups all endpoints into a single dropdown.
Signed-off-by: Michael Price <loneviking72@gmail.com>
2018-04-01 20:22:13 -04:00
Michael Price
764a80fab2 Rename the internal name of the document type permissions namespace.
Signed-off-by: Michael Price <loneviking72@gmail.com>
2018-04-01 20:22:04 -04:00
Michael Price
4e908db62b Move RETRY_DELAY constant to the literals.py module.
Signed-off-by: Michael Price <loneviking72@gmail.com>
2018-04-01 20:21:55 -04:00
Michael Price
b9f7326f6f Remove redundant get_serializer_context as this is already passed to the serializer by default.
Signed-off-by: Michael Price <loneviking72@gmail.com>
2018-04-01 20:21:47 -04:00
Michael Price
28aa0b913c Reorganize and sort models and managers according to Mayan's best practices.
Signed-off-by: Michael Price <loneviking72@gmail.com>
2018-04-01 20:21:37 -04:00
Michael Price
a172538dfc Sort smartlinks by label.
Signed-off-by: Michael Price <loneviking72@gmail.com>
2018-04-01 20:21:31 -04:00
Michael Price
f3c5391d54 Silence the UnorderedObjectListWarning warning for the workflow app.
Signed-off-by: Michael Price <loneviking72@gmail.com>
2018-04-01 20:20:45 -04:00
Michael Price
0a480066df Reorganize common's base test class.
Signed-off-by: Michael Price <loneviking72@gmail.com>
2018-04-01 20:20:37 -04:00
Michael Price
4f5cf81212 Remove completed tasks.
Signed-off-by: Michael Price <loneviking72@gmail.com>
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-04-01 20:20:04 -04:00
Michael Price
96836065a8 Split document.tests.test_views.
Signed-off-by: Michael Price <loneviking72@gmail.com>
2018-04-01 20:19:07 -04:00
Michael Price
77777deec5 Fix transformation imports.
Signed-off-by: Michael Price <loneviking72@gmail.com>
2018-04-01 20:19:01 -04:00
Michael Price
ee58303fbb Move transformations to the their own module.
Signed-off-by: Michael Price <loneviking72@gmail.com>
2018-04-01 20:18:54 -04:00
Michael Price
82000bfe39 Bump version to 3.0
Signed-off-by: Michael Price <loneviking72@gmail.com>
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-04-01 20:18:46 -04:00
Michael Price
cbd8ed52c7 Move the generate_setup.py script to contribs/scripts.
Signed-off-by: Michael Price <loneviking72@gmail.com>
2018-04-01 20:17:45 -04:00
Roberto Rosario
66b873e6e5 Sync pending work file with commit 39b07cc8bf0f6b1d3aeffe9f6f901ca7f7bcce92
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-04-01 20:17:21 -04:00
Michael Price
8e7b288c00 Fix checkout API tests.
Signed-off-by: Michael Price <loneviking72@gmail.com>
2018-04-01 20:15:19 -04:00
Michael Price
395be18151 Fix widget test.
Signed-off-by: Michael Price <loneviking72@gmail.com>
2018-04-01 20:15:10 -04:00
Eric Riggs
1fdb452c9d Add my pending tasks to the list.
Signed-off-by: Eric Riggs <ericriggs42@gmail.com>
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-04-01 20:14:58 -04:00
Michael Price
2802ee233c Close fancybox when clicking on the caption of a preview to move to the document view.
Signed-off-by: Michael Price <loneviking72@gmail.com>
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-04-01 20:13:59 -04:00
Michael Price
d03c6b4646 Update to Fancybox 3. Update to jQuery 3.3.1. Update and simplify MayanImage class.
Signed-off-by: Michael Price <loneviking72@gmail.com>
2018-04-01 20:13:03 -04:00
Roberto Rosario
13d36ab174 commit ce782a37f7 (HEAD -> feature/mayan-edms-ng-3-merge)
Author: Michael Price <loneviking72@gmail.com>
Date:   Mon Mar 12 16:32:29 2018 -0400

    Move pending task chapter to its own topic file. Add release blockers and new features.

    Signed-off-by: Michael Price <loneviking72@gmail.com>

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-04-01 20:12:39 -04:00
Michael Price
ce782a37f7 Move pending task chapter to its own topic file. Add release blockers and new features.
Signed-off-by: Michael Price <loneviking72@gmail.com>
2018-04-01 20:04:18 -04:00
Michael Price
7a6465303d Update tests.
Signed-off-by: Michael Price <loneviking72@gmail.com>
2018-04-01 20:04:11 -04:00
Michael Price
8590bff6e4 Convert document thumbnails, preview, image preview and staging files to template base widgets. Unify all updated widgets. Display resolution settings are now specified as width and height and not a single resolution value.
Signed-off-by: Michael Price <loneviking72@gmail.com>
2018-04-01 20:04:05 -04:00
Michael Price
d29d4ba110 Remove unused staging file method.
Signed-off-by: Michael Price <loneviking72@gmail.com>
2018-04-01 20:03:51 -04:00
Michael Price
f978eb49f4 make sure the printed pages are full width.
Signed-off-by: Michael Price <loneviking72@gmail.com>
2018-04-01 20:03:44 -04:00
Michael Price
3e13d5ae1f Move the invalid document markup to a separate HTML template.
Signed-off-by: Michael Price <loneviking72@gmail.com>
2018-04-01 20:03:27 -04:00
Michael Price
cffc63a29e Don't navigate on links meant to execute javascript on click.
Signed-off-by: Michael Price <loneviking72@gmail.com>
2018-04-01 20:03:10 -04:00
Michael Price
43955d680a Fix indentation error.
Signed-off-by: Michael Price <loneviking72@gmail.com>
2018-04-01 20:03:01 -04:00
Michael Price
baa1307870 Resize elements with the class .full-height after loading via AJAX.
Signed-off-by: Michael Price <loneviking72@gmail.com>
2018-04-01 20:02:54 -04:00
Michael Price
fb565aeb2a Update HISTORY file.
Signed-off-by: Michael Price <loneviking72@gmail.com>
2018-04-01 20:02:39 -04:00
Michael Price
27286fce24 Discard the page content since it is not going to be used. Prevent's javascript error in the console.log.
Signed-off-by: Michael Price <loneviking72@gmail.com>
2018-04-01 20:02:14 -04:00
Michael Price
9b10f59162 Set the document's title dynamically from the loaded AJAX content.
Signed-off-by: Michael Price <loneviking72@gmail.com>
2018-04-01 20:01:43 -04:00
Michael Price
ad3438b859 Don't remove newlines on error message pages.
Signed-off-by: Michael Price <loneviking72@gmail.com>
2018-04-01 20:01:35 -04:00
Michael Price
61cb9ac524 Silence UnorderedObjectListWarning warnings.
Signed-off-by: Michael Price <loneviking72@gmail.com>
2018-04-01 20:01:27 -04:00
Michael Price
55a4798ac3 Silence the UnorderedObjectListWarning warning for the checkouts app.
Signed-off-by: Michael Price <loneviking72@gmail.com>
2018-04-01 20:01:21 -04:00
Michael Price
f85b30c967 Fix the failing tests from the linking app.
Signed-off-by: Michael Price <loneviking72@gmail.com>
2018-04-01 20:01:14 -04:00
Michael Price
abf0ecebaf Fix failing documents app tests.
Signed-off-by: Michael Price <loneviking72@gmail.com>
2018-04-01 20:01:08 -04:00
Michael Price
49bb7c879e Add root API showing the new endpoints.
Signed-off-by: Michael Price <loneviking72@gmail.com>
2018-04-01 20:00:38 -04:00
Michael Price
afd4748426 Don't try to return a serializer if there is no request object. Used when the API view is being introspected.
Signed-off-by: Michael Price <loneviking72@gmail.com>
2018-04-01 20:00:27 -04:00
Michael Price
f8cb63b11a Use a SHA256 hex digest of the secret key at the name of the lockfile.
Signed-off-by: Michael Price <loneviking72@gmail.com>
2018-04-01 20:00:19 -04:00
Michael Price
8a3f9c7e4e Don't scan documents without at least a version for duplicates.
Signed-off-by: Michael Price <loneviking72@gmail.com>
2018-04-01 20:00:12 -04:00
Eric Riggs
2abd37c131 Update HISTORY.md
Signed-off-by: Eric Riggs <ericriggs42@gmail.com>
2018-04-01 19:59:59 -04:00
Eric Riggs
67b940aec9 Add AJAX workers only for the static links.
Signed-off-by: Eric Riggs <ericriggs42@gmail.com>
2018-04-01 19:59:53 -04:00
Eric Riggs
c267933fb8 - Make navigation bar collapse work by code instead of CSS classes.
- Collapse navigation bar on Escape key.

Signed-off-by: Eric Riggs <ericriggs42@gmail.com>
2018-04-01 19:59:41 -04:00
Eric Riggs
ac7cef2fd9 - Remove console logs and debug statements.
- Add code documentation.

Signed-off-by: Eric Riggs <ericriggs42@gmail.com>
2018-04-01 19:59:32 -04:00
Eric Riggs
00185ef936 Clicking any link will collapse a responsive main menu.
Signed-off-by: Eric Riggs <ericriggs42@gmail.com>
2018-04-01 19:59:24 -04:00
Eric Riggs
9e1dd7aa26 Add the MERC specifying javascript library usage.
Signed-off-by: Eric Riggs <ericriggs42@gmail.com>
2018-04-01 19:59:17 -04:00
Eric Riggs
6afd3eb869 Fix missing icons for signin, dashboard links, rotate left and rotate right.
Signed-off-by: Eric Riggs <ericriggs42@gmail.com>
2018-04-01 19:59:10 -04:00
Eric Riggs
5b8ae1be2e Fix cabinet navigation.
Signed-off-by: Eric Riggs <ericriggs42@gmail.com>
2018-04-01 19:59:02 -04:00
Eric Riggs
c7caa53b52 Reload the root template with a view is not loaded via AJAX.
Signed-off-by: Eric Riggs <ericriggs42@gmail.com>
2018-04-01 19:58:56 -04:00
Eric Riggs
5f80563e49 Add the same hidding CSS classes to the new Icon class.
Signed-off-by: Eric Riggs <ericriggs42@gmail.com>
2018-04-01 19:58:49 -04:00
Eric Riggs
cc7eb92550 - Add support for filtering the notification list API by read status.
- Show only unread notification on the badge.

Signed-off-by: Eric Riggs <ericriggs42@gmail.com>
2018-04-01 19:58:42 -04:00
Eric Riggs
98c61bf819 - Fix tabular radio button template.
- Broke with the upgrade to Django 1.11.
- Used by the event subscription form.

Signed-off-by: Eric Riggs <ericriggs42@gmail.com>
2018-04-01 19:58:34 -04:00
Eric Riggs
b083bd534b Fix and update Dropzonejs.
Signed-off-by: Eric Riggs <ericriggs42@gmail.com>
2018-04-01 19:58:28 -04:00
Eric Riggs
6aca0cd874 Add notification count inside a badge on the notification link.
Signed-off-by: Eric Riggs <ericriggs42@gmail.com>
2018-04-01 19:58:21 -04:00
Eric Riggs
ee75f0e92d Prevent default when opening a link in a new window. Fixes Swagger page opening twice.
Signed-off-by: Eric Riggs <ericriggs42@gmail.com>
2018-04-01 19:58:12 -04:00
Eric Riggs
63f3f83fa3 Update partials with server side errors to emulate the old error (404, 403) behavior of Mayan.
Signed-off-by: Eric Riggs <ericriggs42@gmail.com>
2018-04-01 19:58:05 -04:00
Eric Riggs
c8911b901e - Fix the document print view by switching it to a GET view instead.
- Add support for passing the form target.
- Update ajaxForm to emulate '_blank' form targets.

Signed-off-by: Eric Riggs <ericriggs42@gmail.com>
2018-04-01 19:57:54 -04:00
Eric Riggs
410f8fed76 - Fix login and authentication views by adding the html_extra_classes Link attribute and using it to avoid loading authentication clicks as partials.
- Add a new base_plain template as parernt for the authentication templates.

Signed-off-by: Eric Riggs <ericriggs42@gmail.com>
2018-04-01 19:57:47 -04:00
Eric Riggs
5b3285c006 Add periodic AJAX workers to update the value of the notifications link.
Signed-off-by: Eric Riggs <ericriggs42@gmail.com>
2018-04-01 19:57:38 -04:00
Eric Riggs
5704c21d56 Support AJAX anchors with no path and just a query. Used by the pagination links.
Signed-off-by: Eric Riggs <ericriggs42@gmail.com>
2018-04-01 19:57:31 -04:00
Eric Riggs
c2e25e6d0d Add page loading indicator using PACE.js.
Signed-off-by: Eric Riggs <ericriggs42@gmail.com>
2018-04-01 19:57:24 -04:00
Eric Riggs
05dc569a6f Update HISTORY.rst.
Signed-off-by: Eric Riggs <ericriggs42@gmail.com>
2018-04-01 19:57:18 -04:00
Eric Riggs
3d3684daeb Remove unused animate.css package.
Signed-off-by: Eric Riggs <ericriggs42@gmail.com>
2018-04-01 19:57:11 -04:00
Eric Riggs
d6c9ce071c Remove the unused scrollable_content internal feature.
Signed-off-by: Eric Riggs <ericriggs42@gmail.com>
2018-04-01 19:57:01 -04:00
Eric Riggs
accfee4c50 Add template and modal to display server side errors.
Signed-off-by: Eric Riggs <ericriggs42@gmail.com>
2018-04-01 19:56:53 -04:00
Eric Riggs
57f03b21fc - Update the markup of the multiple object action form into a valid markup. The checkboxes are now outside the form's tags.
- Add beforeSerialization callback support to ajaxForm.
- Add a callback to add the external checkboxes to the multiple object action form being submitted.

Signed-off-by: Eric Riggs <ericriggs42@gmail.com>
2018-04-01 19:55:54 -04:00
Eric Riggs
fc8dc74de4 Don't use the previous variable when canceling a form action. Form now use only javascript's history.back().
Signed-off-by: Eric Riggs <ericriggs42@gmail.com>
2018-04-01 19:55:18 -04:00
Eric Riggs
d83a50d36a Use history.back instead of history.go(-1).
Signed-off-by: Eric Riggs <ericriggs42@gmail.com>
2018-04-01 19:55:09 -04:00
Eric Riggs
53c277b420 Remove the main menu from the base template. It should only exist in the root template.
Signed-off-by: Eric Riggs <ericriggs42@gmail.com>
2018-04-01 19:55:01 -04:00
Eric Riggs
3be28131c9 - Pass the AJAX referer for all AJAX requests.
- Switch to synchronous requests.
- All location changes go through the setLocation method.
- Switch to using history.pushState.
- AJAX middleware inserts AJAX referer as the request HTTP_REFERER.

Signed-off-by: Eric Riggs <ericriggs42@gmail.com>
2018-04-01 19:54:50 -04:00
Eric Riggs
f3f4dcd84a - Make Mayan behave like a Single Page App by using partials.
- Add URI.js, Ajax form.
- Split base.js into mayan_app.js, mayan_image.js, partial_navigation.js.
- Add a HOME_VIEW setting. Use it for the default view to be loaded.
- New template loading order root.html -> base.html -> any template. root.html is only loaded once. Other templates are loaded and merged with base.html via ajax load.
- Fix bug in document page view. Was storing the URL and the querystring as a single url variable.

Signed-off-by: Eric Riggs <ericriggs42@gmail.com>
2018-04-01 19:54:15 -04:00
Michael Price
e4f61b3ad8 Fix document search tests.
Signed-off-by: Michael Price <loneviking72@gmail.com>
2018-04-01 19:53:40 -04:00
Michael Price
9ca7ca5ce6 Make sure the document page image API goes via the proper queryset filtering.
Signed-off-by: Michael Price <loneviking72@gmail.com>
2018-04-01 19:53:23 -04:00
Michael Price
381dafc7b9 Update to Font Awesome 5. Add experimental Icon class. Simplify document loading icon.
Signed-off-by: Michael Price <loneviking72@gmail.com>
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-04-01 19:53:03 -04:00
Michael Price
69adce5c02 Add ordering by 'pk' field to the AccessControlList model to silence the UnorderedObjectListWarning warning.
Signed-off-by: Michael Price <loneviking72@gmail.com>
2018-04-01 18:39:34 -04:00
Michael Price
d0c6c7e6de Update ACLs app API tests to the latest API class interface.
Signed-off-by: Michael Price <loneviking72@gmail.com>
2018-04-01 18:39:21 -04:00
Michael Price
e2cc939260 Fix indentation.
Signed-off-by: Michael Price <loneviking72@gmail.com>
2018-04-01 18:39:04 -04:00
Michael Price
702618b924 SearchModel no longer returns result_set. It is unfiltered and unused.
Signed-off-by: Michael Price <loneviking72@gmail.com>
2018-04-01 18:38:53 -04:00
Michael Price
d93fafcf57 Return the result's serializer only during use not during introspection.
Signed-off-by: Michael Price <loneviking72@gmail.com>
2018-04-01 18:38:39 -04:00
Michael Price
f93521395c Django's 1.11 urlencode doesn't work in the same as in version 1.10. Update to fix.
Signed-off-by: Michael Price <loneviking72@gmail.com>
2018-04-01 18:38:14 -04:00
Michael Price
9977759f85 Update HISTORY file.
Signed-off-by: Michael Price <loneviking72@gmail.com>
2018-04-01 18:38:01 -04:00
Roberto Rosario
efc470ff4c Add information on installing flake8's git hook.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-04-01 18:37:49 -04:00
Cornelius Ludmann
d7567f4b97 Test for base64 encoded e-mail attachment filename
Signed-off-by: Cornelius Ludmann <dev@cornelius-ludmann.de>
2018-04-01 18:37:35 -04:00
Cornelius Ludmann
c29d7c6e5b Decode base64 encoded e-mail attachment filename.
According to RFC 2231 the filename of e-mail attachments can be encoded,
e.g. with base64 (for example, the Brother ADS2800W Scanner does this).

Here an example how it looks like:

Content-Disposition: attachment; filename="=?UTF-8?B?QlJXMjg1NjVBOEI5RkQyXzIwMTcwNTIzXzIzMDMzN18wMDAzMDMucGRm?="

Signed-off-by: Cornelius Ludmann <dev@cornelius-ludmann.de>
2018-04-01 18:37:25 -04:00
Michael Price
4b36c27e33 Add API test for the document checkout API.
Signed-off-by: Michael Price <loneviking72@gmail.com>
2018-04-01 18:37:14 -04:00
Michael Price
55ba6786b3 Fix and modernize the document checkout API view. Move API logic to serializer.
Signed-off-by: Michael Price <loneviking72@gmail.com>
2018-04-01 18:36:56 -04:00
Michael Price
3165912837 Format line according to best practices.
Signed-off-by: Michael Price <loneviking72@gmail.com>
2018-04-01 18:36:30 -04:00
Michael Price
44320838a0 Add statistics script to produce a report of the views, APIs and test for each app.
Signed-off-by: Michael Price <loneviking72@gmail.com>
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-04-01 18:36:15 -04:00
Michael Price
cedf5ac7d0 Update to the latest version the packages for building, development, documentation and testing.
Signed-off-by: Michael Price <loneviking72@gmail.com>
2018-04-01 18:31:51 -04:00
Michael Price
1946250cea Update to the latest version of Pillow, django-activity-stream, django-compressor, django-cors-headers, django-formtools, django-qsstats-magic, django-stronghold, django-suit, furl, graphviz, pyocr, python-dateutil, python-magic, pytz, sh.
Signed-off-by: Michael Price <loneviking72@gmail.com>
2018-04-01 18:31:33 -04:00
Michael Price
4378b28777 Update API vies and serializers for the latest Django REST framework version. Replace DRF Swagger with DRF-YASG.
Signed-off-by: Michael Price <loneviking72@gmail.com>
2018-04-01 18:31:22 -04:00
Michael Price
77a3c103d1 Tweak app API urls.
Signed-off-by: Michael Price <loneviking72@gmail.com>
2018-04-01 18:31:11 -04:00
Michael Price
e1956f8d80 Get rids of the APIEndPoint and APIResource classes. Register API url using the 'has_rest_api' AppConfig variable.
Signed-off-by: Michael Price <loneviking72@gmail.com>
2018-04-01 18:30:59 -04:00
Michael Price
36d19ea284 Add API test for the checkout list view.
Signed-off-by: Michael Price <loneviking72@gmail.com>
2018-04-01 18:30:39 -04:00
Michael Price
744976e8a1 Fix flake8 warnings.
Signed-off-by: Michael Price <loneviking72@gmail.com>
2018-04-01 18:30:27 -04:00
Michael Price
d8d6dada5e Add document parsing app API tests.
Signed-off-by: Michael Price <loneviking72@gmail.com>
2018-04-01 18:30:14 -04:00
Michael Price
58c762d9e8 Update HISTORY file.
Signed-off-by: Michael Price <loneviking72@gmail.com>
2018-04-01 18:30:02 -04:00
Michael Price
3c4f9ced11 Add checkouts app API tests.
Signed-off-by: Michael Price <loneviking72@gmail.com>
2018-04-01 18:29:49 -04:00
Michael Price
938093db6f Make sure to require the checkedout detail view permission for the checked out document detail API view.
Signed-off-by: Michael Price <loneviking72@gmail.com>
2018-04-01 18:29:35 -04:00
Michael Price
b4bf9bfaee Switch to a resource and service based API from previous app based one.
Signed-off-by: Michael Price <loneviking72@gmail.com>
2018-04-01 18:28:40 -04:00
Michael Price
f3427c7470 Update HISTORY file.
Signed-off-by: Michael Price <loneviking72@gmail.com>
2018-04-01 18:28:19 -04:00
Michael Price
3919e6404c Improve and add workflow app tests.
Signed-off-by: Michael Price <loneviking72@gmail.com>
2018-04-01 18:28:07 -04:00
Michael Price
775894ee0d Improve permission having in the workflow app views. Most were made more granular and operate now on an object access basis instead of working per view permission.
Signed-off-by: Michael Price <loneviking72@gmail.com>
2018-04-01 18:27:23 -04:00
Michael Price
a4a3c96228 Update workflow links according to the view name updates.
Signed-off-by: Michael Price <loneviking72@gmail.com>
2018-04-01 18:26:55 -04:00
Michael Price
471458fda3 Update workflow views' URL and names for consistency with Mayan's best practices.
Signed-off-by: Michael Price <loneviking72@gmail.com>
2018-04-01 18:26:42 -04:00
Michael Price
b8e97164c8 Remove unused line.
Signed-off-by: Michael Price <loneviking72@gmail.com>
2018-04-01 18:26:13 -04:00
Michael Price
974fa8e210 Fix super class name.
Signed-off-by: Michael Price <loneviking72@gmail.com>
2018-04-01 18:26:02 -04:00
Michael Price
6525f3b854 Update project to use Django 1.11.10 and Django model utils version 3.1.1
Signed-off-by: Michael Price <loneviking72@gmail.com>
2018-04-01 18:25:47 -04:00
Michael Price
984e8a5b2c Silence deprecation warning about default manager for child models. Reorganize model according to Mayan's best practices.
Signed-off-by: Michael Price <loneviking72@gmail.com>
2018-04-01 18:25:32 -04:00
Michael Price
fd9a7217e9 Reduce repeated code in test.
Signed-off-by: Michael Price <loneviking72@gmail.com>
2018-04-01 18:25:18 -04:00
Michael Price
b1080e5fe5 Convert the TextAreaDiv widget to use template-based rendering as per Django's release notes: https://docs.djangoproject.com/en/2.0/releases/1.11/#template-based-widget-rendering
Signed-off-by: Michael Price <loneviking72@gmail.com>
2018-04-01 18:25:03 -04:00
Michael Price
2b77da369d render_subtemplate's Context contructor needs a dictionary as the argument as per Django's release notes: https://docs.djangoproject.com/en/2.0/releases/1.11/#django-template-backends-django-template-render-prohibits-non-dict-context
Signed-off-by: Michael Price <loneviking72@gmail.com>
2018-04-01 18:24:43 -04:00
Michael Price
8f3e1a3eb0 Don't use include for the admin urls as per Django's tutorial documentation at: https://docs.djangoproject.com/en/1.11/intro/tutorial01/
Signed-off-by: Michael Price <loneviking72@gmail.com>
2018-04-01 18:24:12 -04:00
Michael Price
a2a58e925b Add changes from the next version to the HISTORY file.
Signed-off-by: Michael Price <loneviking72@gmail.com>
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-04-01 18:23:49 -04:00
Michael Price
9043291b8d Don't put the raw document queryset in the template context. It is not needed anymore.
Signed-off-by: Michael Price <loneviking72@gmail.com>
2018-04-01 18:23:00 -04:00
Michael Price
4af9dfa36d Don't use document_list which is not paginated. Use object_list instead which is paginated.
Signed-off-by: Michael Price <loneviking72@gmail.com>
2018-04-01 18:22:39 -04:00
Michael Price
72160bf806 Make CabinetDetailView a subclass of DocumentListView to add pagination to the document list.
Signed-off-by: Michael Price <loneviking72@gmail.com>
2018-04-01 18:22:22 -04:00
Michael Price
bc85c3be59 Add inherited permission check for the DocumentPageSearch model.
This and not the DocumentPage is the actual model return for page searches.

Signed-off-by: Michael Price <loneviking72@gmail.com>
2018-04-01 18:21:54 -04:00
Michael Price
e3d400c70d Add common.utils.return_related function to support double underscore related model references.
Signed-off-by: Michael Price <loneviking72@gmail.com>
2018-04-01 18:21:26 -04:00
Roberto Rosario
0edb028bbf Finish updating DocumentAPITestCase tests to test for access.
Start updateing DeletedDocumentAPITestCase tests to test the access.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-04-01 18:19:11 -04:00
Roberto Rosario
cc7f69b908 Continue updating the document app API tests to work with access and permission
level testing.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-04-01 18:16:03 -04:00
Roberto Rosario
1d5a60ef9e Update DocumentTypeAPITestCase to with test with/without access.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-04-01 18:10:02 -04:00
Michael Price
7000ba1630 Don't use gpg1 for testing against sqlite.
Signed-off-by: Michael Price <loneviking72@gmail.com>
2018-04-01 02:53:18 -04:00
Michael Price
026c7d391b Add settings module for easy testing during development.
Signed-off-by: Michael Price <loneviking72@gmail.com>
2018-04-01 02:53:16 -04:00
Michael Price
a1876c065e Don't use gpg1 for testing against sqlite.
Signed-off-by: Michael Price <loneviking72@gmail.com>
2018-04-01 02:52:27 -04:00
Michael Price
d991c82693 Add settings module for easy testing during development.
Signed-off-by: Michael Price <loneviking72@gmail.com>
2018-04-01 02:52:19 -04:00
Roberto Rosario
1ed9f9819a Fix document state migration dependency.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-04-01 02:43:41 -04:00
Michael Price
7db6bd3fc4 Use already available .get_for_class class method and avoid code repetition.
Signed-off-by: Michael Price <loneviking72@gmail.com>
2018-04-01 02:41:33 -04:00
Michael Price
47dfdfbffe Fix MERC type.
Signed-off-by: Michael Price <loneviking72@gmail.com>
2018-04-01 02:40:27 -04:00
Michael Price
17a75d3b2a Fix alphine release and alpine test release Makefile targets.
Signed-off-by: Michael Price <loneviking72@gmail.com>
2018-04-01 02:40:13 -04:00
Michael Price
381dd305c1 Add support forum MERC.
Signed-off-by: Michael Price <loneviking72@gmail.com>
2018-04-01 02:39:52 -04:00
Michael Price
a0980b0fbd Update HISTORY file and Release notes.
Signed-off-by: Michael Price <loneviking72@gmail.com>
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-04-01 02:39:36 -04:00
Michael Price
ad293a8f40 Add Role and Group merging draft MERC.
Signed-off-by: Michael Price <loneviking72@gmail.com>
2018-04-01 02:37:40 -04:00
Michael Price
0b77c5c319 Add Ubuntu package gnupg.
Signed-off-by: Michael Price <loneviking72@gmail.com>
2018-04-01 02:37:27 -04:00
Michael Price
48834eb8b4 Add Ubuntu package gpgv. Sort packages alphabetically.
Signed-off-by: Michael Price <loneviking72@gmail.com>
2018-04-01 02:37:16 -04:00
Michael Price
7b68e271c8 Only pull the Database Docker image for the test that requires it.
Signed-off-by: Michael Price <loneviking72@gmail.com>
2018-04-01 02:36:55 -04:00
Michael Price
a1c8b8e5de Update the Ubuntu package repository before trying to install anything.
Signed-off-by: Michael Price <loneviking72@gmail.com>
2018-04-01 02:36:42 -04:00
Michael Price
b616ffaf1f Add locales package which is missing in Ubuntu 16.04.
Signed-off-by: Michael Price <loneviking72@gmail.com>
2018-04-01 02:36:23 -04:00
Michael Price
8c37bd87d6 GitLab CI testing with Ubuntu 16.10 is failing. Fallback to Ubuntu 16.04.
Signed-off-by: Michael Price <loneviking72@gmail.com>
2018-04-01 02:36:08 -04:00
Michael Price
98f31ff491 Use the get_or_create method instead of a blind create to avoid duplicated notifications for the same event when the user is subscribed to the object's event and to the global event.
Signed-off-by: Michael Price <loneviking72@gmail.com>
2018-04-01 02:35:39 -04:00
Michael Price
d201f2c31c Show horizontal on the list item template only when there are items present.
Signed-off-by: Michael Price <loneviking72@gmail.com>
2018-04-01 02:35:12 -04:00
Michael Price
b45be228d2 Update the remaining document app API tests to test with and without permissions.
Update the remaining API tests to conform to the updated API test class interface.

Signed-off-by: Michael Price <loneviking72@gmail.com>
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-04-01 02:30:37 -04:00
Eric Riggs
99a9a87a56 Update HISTORY file.
Signed-off-by: Eric Riggs <ericriggs42@gmail.com>
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-04-01 02:01:34 -04:00
Eric Riggs
c85035b58e - Improve the styling of the multiple object action form by controlling the top and bottom margins.
- Equalize styling of the multiple object action form in the list items and item subtemplates.

Signed-off-by: Eric Riggs <ericriggs42@gmail.com>
2018-04-01 02:00:27 -04:00
Roberto Rosario
f923904a0e Update changelog.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-04-01 01:59:43 -04:00
Eric Riggs
eceb3ed877 - Make the multi object form perform an auto submit when the value is changed.
- Add multiple object select checkbox that was missing in the list item subtemplate.

Signed-off-by: Eric Riggs <ericriggs42@gmail.com>
2018-04-01 01:57:47 -04:00
Michael Price
0a05c87c9c Update the Pillow and django-mptt versions required.
Signed-off-by: Michael Price <loneviking72@gmail.com>
2018-04-01 01:56:42 -04:00
Michael Price
ec51aecad6 Remove the .gitignore file from 3rd party Javascript libraries.
Signed-off-by: Michael Price <loneviking72@gmail.com>
2018-04-01 01:56:09 -04:00
Michael Price
c21fec9e1d Add draft test writing MERC.
Signed-off-by: Michael Price <loneviking72@gmail.com>
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-04-01 01:55:24 -04:00
Roberto Rosario
6886b22360 Add changelog entry about requiring the document view permission to view trashed documents.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-04-01 01:53:42 -04:00
Michael Price
54e93c1ed6 Customize the empty formset message for the document type metadata type relationship view.
Signed-off-by: Michael Price <loneviking72@gmail.com>
2018-04-01 01:53:08 -04:00
Michael Price
d64f72351d Customize the empty formset message for the document type metadata type relationship view.
Signed-off-by: Michael Price <loneviking72@gmail.com>
2018-04-01 01:52:42 -04:00
Michael Price
34fc5a5bcf Don't error out when there are no metadata types available.
Signed-off-by: Michael Price <loneviking72@gmail.com>
2018-04-01 01:52:11 -04:00
Roberto Rosario
93cba698e4 Instead of throwing an error, display an empty form is there are not event types to display.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-04-01 01:51:25 -04:00
Michael Price
93dbf789d0 Add support for displaying a message when a formset is empty.
Signed-off-by: Michael Price <loneviking72@gmail.com>
2018-04-01 01:45:50 -04:00
Michael Price
d59466123b Fix the test_document_attach_tag_view_with_tag_access test assertion.
Signed-off-by: Michael Price <loneviking72@gmail.com>
2018-04-01 01:41:06 -04:00
Michael Price
1d0ef774e6 Update the remaining document app API tests to test with and without permissions. Update the remaining API tests to conform to the updated API test class interface.
Signed-off-by: Michael Price <loneviking72@gmail.com>
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-04-01 01:38:11 -04:00
Michael Price
68c572bd6e Require the document view permission to view the details of a trashed document.
Add a get method override to document the API endpoint.

Signed-off-by: Michael Price <loneviking72@gmail.com>
2018-04-01 01:33:27 -04:00
Michael Price
54e8f85def Update the linking app API tests to test endpoints with and without permissions or accesses.
Update API tests to conform to the updated API test class interface.

Signed-off-by: Michael Price <loneviking72@gmail.com>
2018-04-01 01:31:19 -04:00
Michael Price
80d7410c15 Update the workflow app API tests to test with and without permissions. Update the API test to conform to the latest API test class interface.
Signed-off-by: Michael Price <loneviking72@gmail.com>
2018-04-01 01:30:51 -04:00
Michael Price
837d64dfdb Register the workflow_view permission to the Document model.
Add task to rebalance the workflow app permission checking.

Signed-off-by: Michael Price <loneviking72@gmail.com>
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-04-01 01:30:21 -04:00
Michael Price
db735bc454 - Require the permission_workflow_view for the workflow to be able to view a document type's workflow list.
- Fix the permission check to create workflows. Previously it has not effect as it has using the
mayan_object_permissions instead of the mayan_view_permissions dictionary.
- Require the permission_workflow_view to view the workflow instance list.
- Require the permission_workflow_view to view a workflow instance's details.

Signed-off-by: Michael Price <loneviking72@gmail.com>
2018-04-01 01:28:38 -04:00
Michael Price
2f4abb22f8 Update the metadata app API tests to test with and without the correspoding permissions and accesses. Update the test to the latest API test class interface. 2018-04-01 01:28:04 -04:00
Michael Price
679cf70269 Associate the permissions: metadata_type_delete/edit/view with the MetadataType model.
Signed-off-by: Michael Price <loneviking72@gmail.com>
2018-04-01 01:27:11 -04:00
Michael Price
3b5c5666b3 Don't register the user create and group create permissions with a their respective models.
These permissions can only be granted globally.

Signed-off-by: Michael Price <loneviking72@gmail.com>
2018-04-01 01:26:54 -04:00
Michael Price
bfa7950d6a Update the MOTD app API tests to test with and without permissions. Update the API tests to conform with the API test class interface.
Signed-off-by: Michael Price <loneviking72@gmail.com>
2018-04-01 01:26:24 -04:00
Michael Price
89b9492f39 Register the corresponding Message model permissions.
Signed-off-by: Michael Price <loneviking72@gmail.com>
2018-04-01 01:25:57 -04:00
Michael Price
8bf3822e54 Update the user OCR API tests to test for fail and success scenarios
based on access. The tests were also updated to comform
with the new API test class interface.

Signed-off-by: Michael Price <loneviking72@gmail.com>
2018-04-01 01:25:38 -04:00
Michael Price
9f3f41f39e Update the tag API tests to test against permission and access success and failure.
Update tag API test to conform to new API test class interface.

Signed-off-by: Michael Price <loneviking72@gmail.com>
2018-04-01 01:25:04 -04:00
Michael Price
8d50e5ecb9 Fix document tag serializer error when trying to add a tag to a document
without having the tag attach permission.

Signed-off-by: Michael Price <loneviking72@gmail.com>
2018-04-01 01:21:40 -04:00
Michael Price
3093a82a9f Add development task reminder about API delete views result code.
Signed-off-by: Michael Price <loneviking72@gmail.com>
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-04-01 01:20:44 -04:00
Michael Price
eae881c35a Update the user management app API tests to test for fail and success scenarios
based on permissions and access. The tests were also updated to comform
with the new API test class interface.

Signed-off-by: Michael Price <loneviking72@gmail.com>
2018-04-01 01:18:58 -04:00
Michael Price
c9f6d64b44 Register the corresponding permissions to the user and group models.
Signed-off-by: Michael Price <loneviking72@gmail.com>
2018-04-01 01:18:30 -04:00
Michael Price
f542dfb07c Update user management app user group view and add API to filter
by group permission too. At the moment the group view permission
is required to add a group to an existing user. This should be
updated to a new specific group permission (ie: group_add, group_remove).

Signed-off-by: Michael Price <loneviking72@gmail.com>
2018-04-01 01:17:01 -04:00
Roberto Rosario
c604ec9c6d Add pending work documentation topic.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-04-01 01:14:13 -04:00
Michael Price
9adddace83 Add the Mayan EDMS Request For Comment starting document.
Add pending tasks to define or complete to the development
topic.

Signed-off-by: Michael Price <loneviking72@gmail.com>
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-04-01 01:13:21 -04:00
Michael Price
f53350a699 Update the dynamic_search app API tests to conform with the new BaseAPITestCase class interface and
to include pass and fail test for each end point.

Signed-off-by: Michael Price <loneviking72@gmail.com>
2018-04-01 01:11:09 -04:00
Michael Price
4834b9d491 Register the corresponding permissions to the Role model.
Signed-off-by: Michael Price <loneviking72@gmail.com>
2018-04-01 01:10:45 -04:00
Michael Price
c556e095e0 Update the dynamic_search app API tests to conform with the new BaseAPITestCase class interface.
Signed-off-by: Michael Price <loneviking72@gmail.com>
2018-04-01 01:10:30 -04:00
Michael Price
57bb282dbc Update the django_gpg app APIs to check for user access. Update corresponding tests.
Signed-off-by: Michael Price <loneviking72@gmail.com>
2018-04-01 01:01:27 -04:00
Michael Price
d3e4876511 Use Django 1.10.8.
Signed-off-by: Michael Price <loneviking72@gmail.com>
2018-04-01 01:01:16 -04:00
Roberto Rosario
05c5151c38 Improve BaseAPITestCase to support normal user login, access
granting and permission granting.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2017-10-23 14:22:04 -04:00
Roberto Rosario
3fc9b8e62c Add makefile target to find .gitignore files in the project files.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2017-10-21 18:30:16 -04:00
Roberto Rosario
0cd5f3c3a3 Make event list's user column an interactive link that
filters by user.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2017-10-21 18:08:40 -04:00
Roberto Rosario
b660c8055f Add view to show list of events performed by an user.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2017-10-21 17:58:05 -04:00
Roberto Rosario
677f49aed5 Add version 2.8 release notes.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2017-09-17 04:01:23 -04:00
Roberto Rosario
68bb791c96 Fix password set tests.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2017-09-17 04:00:57 -04:00
Roberto Rosario
3a695618c1 Add get_absolute_url method to document types.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2017-09-17 03:36:21 -04:00
Roberto Rosario
db83f09b19 Don't error out when an object doesn't provide a get_absolute_url
method.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2017-09-17 03:35:41 -04:00
Roberto Rosario
824c371d92 Update event tests to use .id of an event instead of the .name.
The .id now also returns the namespace.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2017-09-17 03:34:00 -04:00
Roberto Rosario
f2e84c0256 Update changelog.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2017-09-17 03:24:09 -04:00
Roberto Rosario
f475709b08 Remove Vagrant section of the document. Anything related to
Vagrant has been move into its own repository at:
https://gitlab.com/mayan-edms/mayan-edms-vagrant

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2017-09-17 03:23:38 -04:00
Roberto Rosario
3628035884 Update changelog.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2017-09-17 03:22:04 -04:00
Roberto Rosario
2b119ddb93 Improve backported notification changes migrations dependencies.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2017-09-17 03:21:38 -04:00
Roberto Rosario
08d4fbbecd Add missing events app migration.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2017-09-17 03:13:12 -04:00
Roberto Rosario
f0baa16cde Backport support for global and object event notification. GitLab issue #262.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2017-09-17 03:12:40 -04:00
Roberto Rosario
c4c0d4a007 Rename the group user count column label from "Members" to "Users".
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2017-09-17 02:07:31 -04:00
Roberto Rosario
72fc940cd7 Add method to modify a group's role membership from the group's
view.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2017-09-17 02:05:59 -04:00
Roberto Rosario
2dff4c14f9 Fix typo.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2017-09-17 01:44:58 -04:00
Roberto Rosario
f14c67a444 User Django's provided form for setting an users password.
This change allows displaying the current password policies
and validation.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2017-09-17 01:44:16 -04:00
Roberto Rosario
6e93985fe2 Update changelog.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2017-09-17 01:30:28 -04:00
Roberto Rosario
816c0ee703 Show the number of pages of a document and of document versions in
the document list view and document versions list views respectively.
Display a document version's thumbnail before other attributes.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2017-09-17 01:28:52 -04:00
Roberto Rosario
89a3d1d32a Don't show full document version label in the heading of the document
version list view.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2017-09-17 01:27:56 -04:00
Roberto Rosario
b44ccc3d0d Rename the group users link label from "Members" to "Users".
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2017-09-17 01:07:21 -04:00
Roberto Rosario
a82d963998 Rename the role group list link label from "Members" to "Groups".
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2017-09-17 01:06:40 -04:00
Roberto Rosario
ad3bce178c Merge remote-tracking branch 'origin/master' into master 2017-09-11 00:25:37 -04:00
Roberto Rosario
fea83c5bbc Bump version to 2.7.3
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2017-09-11 00:23:28 -04:00
Roberto Rosario
c5ed81c130 Set release notes date.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2017-09-11 00:22:13 -04:00
Roberto Rosario
6ea647822f Tweak position of the document version links for clarity.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2017-09-11 00:19:33 -04:00
Roberto Rosario
02f28b1ac0 Cleanup source app test literals.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2017-09-11 00:00:52 -04:00
Roberto Rosario
da8fa6f91c Fix resolved link class URL mangling when the keep_query argument is used.
Fixes source navigation on the document upload wizard. Thanks to
Nick Douma (LordGaav) for the report and diagnostic information. GitLab
issue #436.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2017-09-10 20:32:13 -04:00
Roberto Rosario
51026cc55e Fix task manager queue list view.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2017-09-07 23:12:02 -04:00
Roberto Rosario
bd4a48c42c Merge branch 'revert-273f94e9' into 'master'
Revert "Merge branch 'fix-context' into 'master'"

See merge request !21
2017-09-07 05:14:35 +00:00
Roberto Rosario
63a7bb0b86 Revert "Merge branch 'fix-context' into 'master'"
This reverts merge request !15
2017-09-07 05:12:21 +00:00
Roberto Rosario
273f94e9b6 Merge branch 'fix-context' into 'master'
Fix error in context: it must be a dict

See merge request !15
2017-09-07 05:09:54 +00:00
Alessandro Pasotti
13bb415187 Fix error in context: it must be a dict 2017-06-15 08:05:17 +02:00
3556 changed files with 169911 additions and 193460 deletions

11
.dockerignore Normal file
View File

@@ -0,0 +1,11 @@
.git
.gitignore
HISTORY.md
mayan/media
db.sqlite*
docker
!docker/etc
!docker/entrypoint.sh
!docker/version
./.*
docs

2
.gitignore vendored
View File

@@ -27,4 +27,6 @@ static_collected/
/misc/mayan.geany
/mayan/media/static/
/venv/
/venv3/
/whoosh_index/
node_modules/

View File

@@ -1,41 +1,227 @@
image: ubuntu:16.10
services:
- mysql:latest
- postgres
before_script:
- echo "LC_ALL=\"en_US.UTF-8\"" >> /etc/default/locale
- locale-gen en_US.UTF-8
- update-locale LANG=en_US.UTF-8
- export LC_ALL=en_US.UTF-8
- apt-get update -qq
- apt-get install -qq curl graphviz python-dev python-pip gcc gnupg1 tesseract-ocr tesseract-ocr-deu ghostscript libjpeg-dev libpng-dev libtiff-dev poppler-utils libreoffice
variables:
POSTGRES_DB: "mayan_edms"
POSTGRES_PASSWORD: "postgres"
MYSQL_ALLOW_EMPTY_PASSWORD: "yes"
MYSQL_DATABASE: "mayan_edms"
test:mysql:
stages:
- test
- build_python
- build_docker
- build_documentation
- push_python
- push_docker
- push_documentation
- deploy
job_docker_build:
stage: build_docker
image: docker:latest
services:
- docker:dind
before_script:
- docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
script:
- apt-get install -qq libmysqlclient-dev
- pip install -r requirements/testing.txt
- pip install mysql-python
- apt-get install -qq mysql-client
- mysql -h"$MYSQL_PORT_3306_TCP_ADDR" -P"$MYSQL_PORT_3306_TCP_PORT" -uroot -p"$MYSQL_ENV_MYSQL_ROOT_PASSWORD" -e "set global character_set_server=utf8mb4;"
- coverage run manage.py test --mayan-apps --settings=mayan.settings.testing.gitlab-ci.db_mysql --nomigrations
- codecov
- docker build --pull -t "$CI_REGISTRY_IMAGE" -f docker/Dockerfile .
- VERSION=`cat docker/version`
- docker tag "$CI_REGISTRY_IMAGE" "$CI_REGISTRY_IMAGE:$VERSION"
- docker run --rm "$CI_REGISTRY_IMAGE:$VERSION" run-tests
- docker push "$CI_REGISTRY_IMAGE:$VERSION"
- docker push "$CI_REGISTRY_IMAGE:latest"
- docker tag "$CI_REGISTRY_IMAGE:$VERSION" registry-1.docker.io/mayanedms/mayanedms:"$VERSION"
- docker tag "$CI_REGISTRY_IMAGE:$VERSION" registry-1.docker.io/mayanedms/mayanedms:latest
- docker logout
only:
- releases/all
- releases/docker
job_docker_push:
stage: push_docker
image: docker:latest
services:
- docker:dind
before_script:
- docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
script:
- VERSION=`cat docker/version`
- docker pull "$CI_REGISTRY_IMAGE:$VERSION"
- docker tag "$CI_REGISTRY_IMAGE:$VERSION" registry-1.docker.io/mayanedms/mayanedms:"$VERSION"
- docker tag "$CI_REGISTRY_IMAGE:$VERSION" registry-1.docker.io/mayanedms/mayanedms:latest
- docker logout
- docker login -u "$DOCKER_HUB_USERNAME" -p "$DOCKER_HUB_PASSWORD" https://registry-1.docker.io
- docker push registry-1.docker.io/mayanedms/mayanedms:"$VERSION"
- docker push registry-1.docker.io/mayanedms/mayanedms:latest
only:
- releases/all
- releases/docker
job_docker_nightly:
stage: build_docker
image: docker:latest
services:
- docker:dind
before_script:
- docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
script:
- docker build --pull -t "$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG" -f docker/Dockerfile .
- docker run --rm "$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG" run-tests
- docker push "$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG"
only:
- nightly
- staging
job_documentation_build:
stage: build_documentation
image: ubuntu:18.04
artifacts:
expire_in: 1 hr
paths:
- docs
before_script:
- apt-get -qq update
- apt-get install -qq locales make python-pip enchant
- echo "LC_ALL=\"en_US.UTF-8\"" >> /etc/default/locale
- locale-gen en_US.UTF-8
- update-locale LANG=en_US.UTF-8
- export LC_ALL=en_US.UTF-8
script:
- pip install -r requirements/documentation.txt
- cd docs
- make html
only:
- releases/all
- releases/documentation
job_documentation_push:
stage: push_documentation
image: ubuntu:18.04
before_script:
- mkdir -p ~/.ssh
- chmod 700 ~/.ssh
- echo "$DOCUMENTATION_SSH_KNOWN_HOSTS" > ~/.ssh/known_hosts
- chmod 644 ~/.ssh/known_hosts
- 'which ssh-agent || ( apt-get update -y && apt-get install openssh-client rsync -y )'
- eval $(ssh-agent -s)
- echo "$DOCUMENTATION_SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add - > /dev/null
script:
- rsync -avzP --progress -e ssh docs/_build/html/* mayandocs@docs.mayan-edms.com:/home/rosarior/webapps/mayan_docs
only:
- releases/all
- releases/documentation
job_build_python:
stage: build_python
image: ubuntu:18.04
artifacts:
expire_in: 1 hr
paths:
- dist
before_script:
- apt-get -qq update
- apt-get install -qq locales make python-pip
script:
- echo "LC_ALL=\"en_US.UTF-8\"" >> /etc/default/locale
- locale-gen en_US.UTF-8
- update-locale LANG=en_US.UTF-8
- export LC_ALL=en_US.UTF-8
- pip install -r requirements/build.txt
- make wheel
only:
- releases/all
- releases/python
job_push_python:
stage: push_python
image: ubuntu:18.04
before_script:
- apt-get -qq update
- apt-get install -qq python-pip
script:
- pip install -r requirements/build.txt
- echo "$PYPIRC" > ~/.pypirc
- twine upload dist/* -r pypi
only:
- releases/all
- releases/python
.test_base: &test_base
stage: test
image: ubuntu:16.04
cache:
paths:
- ~/.cache/pip/
- /var/cache/apt/archives/
before_script:
- apt-get -qq update
- apt-get install -qq locales
- echo "LC_ALL=\"en_US.UTF-8\"" >> /etc/default/locale
- locale-gen en_US.UTF-8
- update-locale LANG=en_US.UTF-8
- export LC_ALL=en_US.UTF-8
- apt-get install -qq curl gcc ghostscript gpgv gnupg graphviz libfuse2 libjpeg-dev libmagic1 libpng-dev libtiff-dev poppler-utils libreoffice poppler-utils python-dev python-pip tesseract-ocr tesseract-ocr-deu
- pip install -r requirements/testing.txt
only:
- releases/all
- releases/docker
- releases/python
- master
- staging
- nightly
test-mysql:
<<: *test_base
variables:
MYSQL_ALLOW_EMPTY_PASSWORD: "yes"
MYSQL_DATABASE: "mayan_edms"
services:
- mysql:8.0.3
script:
- apt-get install -qq libmysqlclient-dev mysql-client
- pip install mysql-python
- mysql -h"$MYSQL_PORT_3306_TCP_ADDR" -P"$MYSQL_PORT_3306_TCP_PORT" -uroot -p"$MYSQL_ENV_MYSQL_ROOT_PASSWORD" -e "set global character_set_server=utf8mb4;"
- python manage.py test --mayan-apps --settings=mayan.settings.testing.gitlab-ci.db_mysql --nomigrations
tags:
- mysql
test:postgres:
test-postgres:
<<: *test_base
variables:
POSTGRES_DB: "mayan_edms"
POSTGRES_PASSWORD: "postgres"
services:
- postgres
script:
- apt-get install -qq libpq-dev
- pip install -r requirements/testing.txt
- pip install psycopg2
- coverage run manage.py test --mayan-apps --settings=mayan.settings.testing.gitlab-ci.db_postgres --nomigrations
- codecov
- apt-get install -qq libpq-dev
- pip install psycopg2
- python manage.py test --mayan-apps --settings=mayan.settings.testing.gitlab-ci.db_postgres --nomigrations
tags:
- postgres
test:sqlite:
test-sqlite:
<<: *test_base
script:
- pip install -r requirements/testing.txt
- coverage run manage.py test --mayan-apps --settings=mayan.settings.testing.gitlab-ci --nomigrations
- codecov
- python manage.py test --mayan-apps --settings=mayan.settings.testing.gitlab-ci --nomigrations
deploy_demo:
environment:
name: demo
stage: deploy
before_script:
- mkdir -p ~/.ssh
- echo "${DEMO_SSH_KNOWN_HOST}" > ~/.ssh/known_hosts
- chmod 644 ~/.ssh/known_hosts
- echo "${DEMO_PRIVATE_KEY}" > ~/.ssh/id_rsa
- chmod 600 ~/.ssh/id_rsa
script:
- scp contrib/scripts/install/docker.sh root@$DEMO_IP_ADDRESS:~
- ssh root@$DEMO_IP_ADDRESS "DELETE_VOLUMES=true ./docker.sh"
when: manual
deploy_staging:
environment:
name: staging
stage: deploy
before_script:
- mkdir -p ~/.ssh
- echo "${STAGING_SSH_KNOWN_HOST}" > ~/.ssh/known_hosts
- chmod 644 ~/.ssh/known_hosts
- echo "${STAGING_PRIVATE_KEY}" > ~/.ssh/id_rsa
- chmod 600 ~/.ssh/id_rsa
script:
- scp contrib/scripts/install/docker.sh root@$STAGING_IP_ADDRESS:~
- ssh root@$STAGING_IP_ADDRESS "DOCKER_MAYAN_IMAGE=registry.gitlab.com/mayan-edms/mayan-edms:staging ./docker.sh"
when: manual

6
.isort.cfg Normal file
View File

@@ -0,0 +1,6 @@
[settings]
default_section = THIRDPARTY
known_first_party = mayan
known_django = django
multi_line_output = 5
sections = FUTURE,STDLIB,DJANGO,THIRDPARTY,FIRSTPARTY,LOCALFOLDER

View File

@@ -19,6 +19,12 @@ source_lang = en
source_file = mayan/apps/authentication/locale/en/LC_MESSAGES/django.po
type = PO
[mayan-edms.autoadmin-2-0]
file_filter = mayan/apps/autoadmin/locale/<lang>/LC_MESSAGES/django.po
source_lang = en
source_file = mayan/apps/autoadmin/locale/en/LC_MESSAGES/django.po
type = PO
[mayan-edms.cabinets-2-0]
file_filter = mayan/apps/cabinets/locale/<lang>/LC_MESSAGES/django.po
source_lang = en
@@ -43,6 +49,12 @@ source_lang = en
source_file = mayan/apps/converter/locale/en/LC_MESSAGES/django.po
type = PO
[mayan-edms.dashboards-2-0]
file_filter = mayan/apps/dashboards/locale/<lang>/LC_MESSAGES/django.po
source_lang = en
source_file = mayan/apps/dashboards/locale/en/LC_MESSAGES/django.po
type = PO
[mayan-edms.django_gpg-2-0]
file_filter = mayan/apps/django_gpg/locale/<lang>/LC_MESSAGES/django.po
source_lang = en
@@ -97,6 +109,12 @@ source_lang = en
source_file = mayan/apps/events/locale/en/LC_MESSAGES/django.po
type = PO
[mayan-edms.file_caching-2-0]
file_filter = mayan/apps/file_caching/locale/<lang>/LC_MESSAGES/django.po
source_lang = en
source_file = mayan/apps/file_caching/locale/en/LC_MESSAGES/django.po
type = PO
[mayan-edms.linking-2-0]
file_filter = mayan/apps/linking/locale/<lang>/LC_MESSAGES/django.po
source_lang = en

View File

@@ -23,6 +23,7 @@ with deployments, webservers, cloud providers, etc.
Code
----
1. Complete and mail, or scan and email the corresponding Contributor Assignment Agreement: [Mayan EDMS Individual Contributor Assignment Agreement](https://docs.mayan-edms.com/topics/caa_individual.rst) or [Mayan EDMS Entity Contributor Assignment Agreement](https://docs.mayan-edms.com/topics/topics/caa_entity.rst).
1. Fork [the repository](http://gitlab.com/mayan-edms/mayan-edms).
1. Choose the version for which you want to develop. The code is divided in the
following branches:
@@ -74,5 +75,5 @@ translation. Language teams that don't see activity for a while are deleted.
Code style
----------
- Refer to the [Development](http://mayan.readthedocs.io/en/latest/topics/development.html)
- Refer to the [Development](https://docs.mayan-edms.com/topics/development.html)
chapter for information and examples of the code style.

File diff suppressed because it is too large Load Diff

60
HISTORY_1_x.rst Normal file
View File

@@ -0,0 +1,60 @@
1.1.1 (2015-05-21)
==================
- Update to Django 1.6.11
- Fix make_dist.sh script
- Add test for issue #163
- Activate tests for the sources app
- Removal of the registration app
- New simplified official project description
- Improvements to the index admin interface
- Removal of installation statistics gathering
- Remove unused folder tag
- Fix usage of ugettext to ugettext_lazy
- Increase size of the lock name field
- New style documentation
1.1 (2015-02-10)
================
- Uses Celery for background tasks
- Removal of the splash screen
- Adds a home view with common function buttons
- Support for sending and receiving documents via email
- Removed custom logging app in favor of django-actvity-stream
- Adds watch folders
- Includes Vagrant file for unified development and testing environments
- Per user locale profile (language and timezone)
- Includes news document workflow app
- Optional and required metadata types
- Improved testings. Automated tests against SQLite, MySQL, PostgreSQL
- Many new REST API endpoints added
- Simplified text messages
- Improved method for custom settings
- Addition of CORS support to the REST API
- Per document language setting instead of per installation language setting
- Metadata validation and parsing support
- Start of code updates towards Python 3 support
- Simplified UI
- Stable PDF previews generation
- More technical documentation
1.0 (2014-08-27)
================
- New home @ https://github.com/mayan-edms/mayan-edms
- Updated to use Django 1.6
- Translation updates
- Custom model properties removal
- Source code improvements
- Removal of included 3rd party modules
- Automatic testing and code coverage check
- Update of required modules and libraries versions
- Database connection leaks fixes
- Support for deletion of detached signatures
- Removal of Fabric based installations script
- Pluggable OCR backends
- OCR improvements
- License change, Mayan EDMS in now licensed under the Apache 2.0 License
- PyPI package, Mayan EDMS in now available on PyPI: https://pypi.python.org/pypi/mayan-edms/
- New REST API

435
HISTORY_2_x.rst Normal file
View File

@@ -0,0 +1,435 @@
2.7.3 (2017-09-11)
==================
- Fix task manager queue list view. Thanks to LeVon Smoker for
the report.
- Fix resolved link class URL mangling when the keep_query argument is
used. Thanks to Nick Douma(LordGaav) for the report and diagnostic
information. Fixes source navigation on the document upload wizard.
2.7.2 (2017-09-06)
==================
- Fix new mailer creation view. GitLab issue #431.
Thanks to Robert Schöftner(@robert.schoeftner) for the
report and the solution.
- Consolidate intial document created event and the first
document properties edited events. Preserve the user that
initially creates the document. GitLab issue #433. Thanks
to Jesaja Everling(@jeverling) for the report.
- Sort the list of root cabinets. Thanks to Thomas Plotkowiak
for the request.
- Sort the list of a document's cabinets.
- Display a document's cabinet list in italics. GitLab issue #435.
Thanks to LeVon Smoker for the request.
- Install mock by default to allow easier testing of deployed
instances.
2.7.1 (2017-09-03)
==================
- Support unicode in URL querystring. GitLab issue #423.
Thanks to Gustavo Teixeira (@gsteixei) for the find.
- Import errors during initialization are only ignored
if they are cause by a missing local.py. Thanks to
MacRobb Simpson for the report and solution.
- Make sure the local.py created used unicode for strings
by default. GitLab issue #424. Thanks to Gustavo Teixeira
(@gsteixei) for the find.
2.7 (2017-08-30)
================
- Add workaround for PDF with IndirectObject as the
rotation value. GitHub #261.
- Add ACL list link with icon and use it for the document facet menu.
- Fix mailing app permissions labels.
- Add ACLs link and ACLs permissions to the mailer profile model.
- Improve mailer URL regex.
- Add ordering support to the SourceColumn class. GitLab issue #417.
- Shows the cabinets in the document list. GitLab #417 @corneliusludmann
- Add workaround for pycountry versions without the bibliographical key.
GitHub issue #250.
- Skip UUID migration on Oracle backends. GitHub issue #251.
- Allow changing the output format, DPI of the pdftoppm command, and
the output format of the converter via the CONVERTER_GRAPHICS_BACKEND_CONFIG
setting. GitHub issues #256 #257 GitLab issue #416.
- Add support for workflow triggers.
- Add support for workflow actions.
- Add support for rendering workflows.
- Add support for unbinding sub menus.
- Fix mailing profile test view.
- Disregard the last 3 dots that mark the end of the YAML document.
- Add support for multiple dashboards.
- Add support for removing dashboard widgets.
- Convert document version view to item list view.
- Add support for browsing individual document versions.
- Add support for dropdown menus to the item list view template.
- Add support for preserving the file extension when downloading a document
version. GitLab #415.
- Split OCR app into OCR and parsing.
- Remove Folders app.
- Use the literal 'System' instead of the target name when
the action user in unknown.
- Remove the view to submit all document for OCR.
- When changing document types, don't delete the old metadata that is
also found in the new document type. GitLab issue #421.
- Add tag attach and tag remove events.
- Change the permission needed to attach and remove tags.
- Add HTTP POST workflow state action.
- Add access control grant workflow state action.
- Beta Python 3 support.
2.6.4 (2017-07-26)
==================
- Add missing replacements of reverse to resolve_url.
2.6.3 (2017-07-25)
==================
- Add makefile target to launch a PostgreSQL container.
- Use resolve_url instead of redirect to resolve the post login URL.
- Make the intialsetup and performupgrade management tasks work
with signals to allow customization from 3rd party apps.
- PEP8 cleanups.
- Add tag_ids keyword argument to the Source.handle_upload
model method. GitLab issue #413.
- Add overflow wrapping so wrap long titles in Firefox too.
- Makes Roles searchable. GitLab issue #402.
- Add line numbers to the debug and production loggers.
Add date and time to the production logger.
- Add support for generating setup.py from a template. GitLab
#149 #200.
- Add fade in animation to document images.
2.6.2 (2017-07-19)
==================
- Fix deprecation warning to prepare upgrade to Django 1.11 and 2.0.
- Fix document page zoom.
- Add support to run tests against a MySQL, Postgres or Oracle container.
- Improve tag widget customization by moving the markup to its own template.
- Fix document page widget appearance in the document page list view.
- Make document version order deterministic.
- Allow total page number instrospection of encrypted PDF with non ASCII user properties. GitLab issue #411.
- Oracle database compatibility update in the cabinets app. GitHub #258.
2.6.1 (2017-07-18)
==================
- Fix issue when editing or removing metadata from multiple documents.
2.6 (2017-07-18)
================
- Fix HTML mark up in window title. GitLab #397.
- Add support for emailing documents to a recipient list. GitLab #396.
- Backport metadata widget changes from @Macrobb. GitLab #377.
- Make users and group searchable.
- Add support for logging errors during in production mode.
Add COMMON_PRODUCTION_ERROR_LOG_PATH to control path of log file.
Defaults to mayan/error.log.
- Add support logging request exceptions.
- Add document list item view.
- Sort setting by namespace label and by global name second.
- Sort indexes by label.
- Fix cabinets permission and access control checking.
- The permission to add or remove documents to cabinets now applies to documents too.
- Equalize dashboard widgets heights.
- Switch the order of the DEFAULT_AUTHENTICATION_CLASSES of DRF. GitLab #400.
- Backport document's version list view permission.
- Improve code to unbind menu entries.
- Renamed the document type permission namespace from "Document setup" to "Document types".
- Add support for granting the document type edit, document type delete, and document type view
permissions to individual document type instances.
- Improved tests by testing for accesses.
- Increase the size of the mailing profile label field to 128 characters.
2.5.2 (2017-07-08)
==================
- Improve new document creation signal handling.
Fixes issue with duplicate scanning at upload.
2.5.1 (2017-07-08)
==================
- Update release target due to changes in PyPI.
2.5 (2017-07-07)
================
- Add view to download a document's OCR text. GitLab #215
- Add user configurable mailer. GitLab #286.
- Use Toasts library for screen messages.
- Reduce verbosity of some debug messages.
- Add new lineart transformation.
- Fix SANE source resolution field.
- About and Profile menu reorganization.
- PDF compatibility improvements.
- Office document coversion improvements.
- New metadata type setup UI.
- Duplicated document scan support.
- "Remember me" login support.
- Forgotten password restore via email.
- Document cache disabling.
- Translation improvements.
- Image loading improvements.
- Lower JavaScript memory utilization.
- HTML reponsive layout improvements.
- Make document deletion a background task.
- Unicode handling improvements.
- Python3 compatilibyt improvements.
- New screen messages using Toastr.
2.4 (2017-06-23)
================
- Add Django-mathfilters.
- Improve render of documents with no pages.
- Add SANE scanner document source.
- Added PDF orientation detection. GitLab issue #387.
- Fix repeated permission list API URL. GitLab issue #389.
- Fix role creation API endpoint not returning id. GitLab issue #390.
- Make tags, metadata types and cabinets searchable via the dynamic search API. GitLab issue #344.
- Add support for updating configuration options from environment variables.
- Add purgelocks management command. GitLab issue #221.
- Fix index rebuilding for multi value first levels. GitLab issue #391.
- Truncate views titles via the APPEARANCE_MAXIMUM_TITLE_LENGTH setting. GitLab issue #217.
- Add background task manager app. GitLab issue #132.
- Add link to show a document's OCR errors. GitLab issue #291.
2.3 (2017-06-08)
================
- Allow for bigger indexing expression templates.
- Auto select checkbox when updating metadata values. GitLab issue #371.
- Added support for passing the options allow-other and allow-root to the
FUSE index mirror. GitLab issue #385
- Add support for check for the latest released version of Mayan from the
About menu.
- Support for rebuilding specific indexes. GitLab issue #372.
- Rewrite document indexing code to be faster and use less locking.
- Use a predefined file path for the file lock.
- Catch documents with not document version when displaying their thumbnails.
- Document page navigation fix when using Mayan as a sub URL app.
- Add support for indexing on workflow state changes.
- Add search model list API endpoint.
2.2 (2017-04-26)
================
- Remove the installation app (GitLab #301).
- Add support for document page search
- Remove recent searches feature
- Remove dependency on the django-filetransfer library
- Fix height calculation in resize transformation
- Improve upgrade instructions
- New image caching pipeline
- New drop down menus for the documents, folders and tags app as well as for
the user links.
- New Dashboard view
- Moved licenses to their own module in every app
- Update project to work with Django 1.10.4.
- Tags are alphabetically ordered by label (GitLab #342).
- Stop loading theme fonts from the web (GitLab #343).
- Add support for attaching multiple tags (GitLab #307).
- Integrate the Cabinets app.
2.1.11 (2017-03-14)
===================
- Added a quick rename serializer to the document type API serializer.
- Added per document type, workflow list API view.
- Mayan EDMS was adopted a version 1.1 of the Linux Foundation Developer Certificate of Origin.
- Added the detail url of a permission in the permission serializer.
- Added endpoints for the ACL app API.
- Implemented document workflows transition ACLs. GitLab issue #321.
- Add document comments API endpoints. GitHub issue #249.
- Add support for overriding the Celery class.
- Changed the document upload view in source app to not use the HTTP referer
URL blindly, but instead recompose the URL using known view name. Needed
when integrating Mayan EDMS into other app via using iframes.
- Addes size field to the document version serializer.
- Removed the serializer from the deleted document restore API endpoint.
- Added support for adding or editing document types to smart links via the
API.
2.1.10 (2017-02-13)
===================
- Update Makefile to use twine for releases.
- Add Makefile target to make test releases.
2.1.9 (2017-02-13)
==================
- Update make file to Workaround long standing pypa wheel bug #99
2.1.8 (2017-02-12)
==================
- Fixes in the trashed document API endpoints.
- Improved tags API PUT and PATCH endpoints.
- Bulk document adding when creating and editing tags.
- The version of django-mptt is preserved in case mayan-cabinets is installed.
- Add Django GPG API endpoints for singing keys.
- Add API endpoints for the document states (workflows) app.
- Add API endpoints for the messsage of the day (MOTD) app.
- Add Smart link API endpoints.
- Add writable versions of the Document and Document Type serializers (GitLab issues #348 and #349).
- Close GitLab issue #310 "Metadata's lookup with chinese messages when new document"
2.1.7 (2017-02-01)
==================
- Improved user management API endpoints.
- Improved permissions API endpoints.
- Improvements in the API tests of a few apps.
- Addition Content type list API view to the common app.
- Add API endpoints to the events app.
- Enable the parser and validation fields of the metadata serializer.
2.1.6 (2016-11-23)
==================
- Fix variable name typo in the rotation transformation class.
- Update translations
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)
==================
- Add missing link to the 2.1.3 release notes in the index file.
- Improve TempfileCheckMixin.
- Fix statistics namespace list display view.
- Fix events list display view.
- Update required Django version to 1.8.15.
- Update required python-gnupg version to 0.3.9.
- Improved orphaned temporary files test mixin.
- Re-enable and improve GitLab CI MySQL testing.
- Improved GPG handling.
- New GPG backend system.
- Minor documentation updates.
2.1.3 (2016-06-29)
==================
- Add help message when initialsetup migration phase fails. Relates to GitLab issue #296.
- Start using self.setdout instead of print as per documentation.
- Fix GitLab issue #295, "When editing a user the top bar jumps to the name of the user".
- Normalize handling of temporary file and directory creation.
- Fix GitLab issue #309, "Temp files quickly filling-up my /tmp (1GB tmpfs)".
- Explicitly check for residual temporary files in tests.
- Add missing temporary file cleanup for office documents.
- Fix file descriptor leak in the document signature download test.
2.1.2 (2016-05-20)
==================
- Sort document languages and user profile locale language lists. GitLab issue #292.
- Fix metadata lookup for {{ users }} and {{ group }}. Fixes GitLab #290.
- Add Makefile for common development tasks
2.1.1 (2016-05-17)
==================
- Fix navigation issue that make it impossible to add new sources. GitLab issue #288.
- The Tesseract OCR backend now reports if the requested language file is missing. GitLab issue #289.
- Ensure the automatic default index is created after the default document type.
2.1 (2016-05-14)
================
- Upgrade to use Django 1.8.13. Issue #246.
- Upgrade requirements.
- Remove remaining references to Django's User model. GitLab issue #225
- Rename 'Content' search box to 'OCR'.
- Remove included login required middleware using django-stronghold instead (http://mikegrouchy.com/django-stronghold/).
- Improve generation of success and error messages for class based views.
- Remove ownership concept from folders.
- Replace strip_spaces middleware with the spaceless template tag. GitLab issue #255
- Deselect the update checkbox for optional metadata by default.
- Silence all Django 1.8 model import warnings.
- Implement per document type document creation permission. Closes GitLab issue #232.
- Add icons to the document face menu links.
- Increase icon to text spacing to 3px.
- Make document type delete time period optional.
- Fixed date locale handling in document properties, checkout and user detail views.
- Add new permission: checkout details view.
- Add HTML5 upload widget. Issue #162.
- Add Message of the Day app. Issue #222
- Update Document model's uuid field to use Django's native UUIDField class.
- Add new split view index navigation
- Newly uploaded documents appear in the Recent document list of the user.
- Document indexes now have ACL support.
- Remove the document index setup permission.
- Status messages now display the object class on which they operate not just the word "Object".
- More tests added.
- Handle unicode filenames in staging folders.
- Add staging file deletion permission.
- New document_signature_view permission.
- Add support for signing documents.
- Instead of multiple keyservers only one keyserver is now supported.
- Replace document type selection widget with an opened selection list.
- Add mailing documentation chapter.
- Add roadmap documentation chapter.
- API updates.
2.0.2 (2016-02-09)
==================
- Install testing dependencies when installing development dependencies.
- Fix GitLab issue #250 "Empty optional lookup metadata trigger validation error".
- Fix OCR API test.
- Move metadata form value validation to .clean() method.
- Only extract validation error messages from ValidationError exception instances.
- Don't store empty metadata value if the update checkbox is not checked.
- Add 2 second delay to document version tests to workaround MySQL limitation.
- Strip HTML tags from the browser title.
- Remove Docker and Docker Compose files.
2.0.1 (2016-01-22)
==================
- Fix GitLab issue #243, "System allows a user to skip entering values for a required metadata field while uploading a new document"
- Fix GitLab issue #245, "Add multiple metadata not possible"
- Updated Vagrantfile to provision a production box too.
2.0 (2015-12-04)
================
- New source homepage: https://gitlab.com/mayan-edms/mayan-edms
- Update to Django 1.7
- New Bootstrap Frontend UI
- Easier theming and rebranding
- Improved page navigation interface
- Menu reorganization
- Removal of famfam icon set
- Improved document preview generation
- Document submission for OCR changed to POST
- New YAML based settings system
- Removal of auto admin creation as separate app
- Removal of dependencies
- ACL system refactor
- Object access control inheritance
- Removal of anonymous user support
- Metadata validators refactor
- Trash can support
- Retention policies
- Support for sharing indexes as FUSE filesystems
- Clickable preview images titles
- Removal of eval
- Smarter OCR, per page parsing or OCR fallback
- Improve failure tolerance (not all Operational Errors are critical now)
- RGB tags
- Default document type and default document source
- Link unbinding
- Statistics refactor
- Apps merge
- New signals
- Test improvements
- Indexes recalculation after document creation too
- Upgrade command
- OCR data moved to ocr app from documents app
- New internal document creation workflow return a document stub
- Auto console debug logging during development and info during production
- New class based and menu based navigation system
- New class based transformations
- Usage of Font Awesome icons set
- Management command to remove obsolete permissions: `purgepermissions`
- Normalization of 'title' and 'name' fields to 'label'
- Improved API, now at version 1
- Invert page title/project name order in browser title
- Django's class based views pagination
- Reduction of text strings
- Removal of the CombinedSource class
- Removal of default class ACLs
- Removal of the ImageMagick and GraphicsMagick converter backends
- Remove support for applying roles to new users automatically
- Removal of the DOCUMENT_RESTRICTIONS_OVERRIDE permission
- Removed the page_label field

View File

@@ -1,4 +1,4 @@
Copyright 2011-2015 Roberto Rosario
Copyright 2011-2018 Roberto Rosario
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.

View File

@@ -1,3 +1,3 @@
include README.md LICENSE HISTORY.rst mayan/LICENSE
recursive-include mayan/apps *.txt *.html *.css *.ico *.png *.jpg *.js *.po *.mo *.ttf *.woff *.woff2 *.gif *.eot *.svg *.doc *.pdf *.tiff *.sig *.asc *.gpg *.zip
recursive-include mayan/apps *.txt *.html *.css *.ico *.png *.jpg *.js *.po *.mo *.ttf *.woff *.woff2 *.gif *.eot *.svg *.doc *.pdf *.tiff *.sig *.asc *.gpg *.zip *.tar *.gz *.bz2 package.json
global-exclude mayan/settings/local.py mayan/settings/travis/* mayan/media/*

195
Makefile
View File

@@ -1,12 +1,14 @@
.PHONY: clean-pyc clean-build
help:
help: docker-help
@echo
@echo "**** Main makefile ****"
@echo "clean-build - Remove build artifacts."
@echo "clean-pyc - Remove Python artifacts."
@echo "clean - Remove Python and build artifacts."
@echo "generate_setup - Create and updated setup.py"
@echo "generate-setup - Create and updated setup.py"
@echo "check-readme - Checks validity of the README.rst file for PyPI publication."
@echo "check-missing_migrations - Make sure all models have proper migrations."
@echo "test-all - Run all tests."
@echo "test MODULE=<python module name> - Run tests for a single app, module or test class."
@@ -17,43 +19,35 @@ help:
@echo "test-with-oracle-all - Run all tests against a Oracle database container."
@echo "test-oracle MODULE=<python module name> - Run tests for a single app, module or test class against a Oracle database container."
@echo "docs_serve - Run the livehtml documentation generator."
@echo "docs-serve - Run the livehtml documentation generator."
@echo "translations_make - Refresh all translation files."
@echo "translations_compile - Compile all translation files."
@echo "translations_push - Upload all translation files to Transifex."
@echo "translations_pull - Download all translation files from Transifex."
@echo "requirements_dev - Install development requirements."
@echo "requirements_docs - Install documentation requirements."
@echo "requirements_testing - Install testing requirements."
@echo "translations-make - Refresh all translation files."
@echo "translations-compile - Compile all translation files."
@echo "translations-push - Upload all translation files to Transifex."
@echo "translations-pull - Download all translation files from Transifex."
@echo "sdist - Build the source distribution package."
@echo "wheel - Build the wheel distribution package."
@echo "release - Package (sdist and wheel) and upload a release."
@echo "test_release - Package (sdist and wheel) and upload to the PyPI test server."
@echo "release_test_via_docker_ubuntu - Package (sdist and wheel) and upload to the PyPI test server using an Ubuntu Docker builder."
@echo "release_test_via_docker_alpine - Package (sdist and wheel) and upload to the PyPI test server using an Alpine Docker builder."
@echo "release_via_docker_ubuntu - Package (sdist and wheel) and upload to PyPI using an Ubuntu Docker builder."
@echo "release_via_docker_alpine - Package (sdist and wheel) and upload to PyPI using an Alpine Docker builder."
@echo "test_sdist_via_docker_ubuntu - Make an sdist packange and test it using an Ubuntu Docker container."
@echo "test_wheel_via_docker_ubuntu - Make a wheel package and test it using an Ubuntu Docker container."
@echo "test-release - Package (sdist and wheel) and upload to the PyPI test server."
@echo "release-test-via-docker-ubuntu - Package (sdist and wheel) and upload to the PyPI test server using an Ubuntu Docker builder."
@echo "release-via-docker-ubuntu - Package (sdist and wheel) and upload to PyPI using an Ubuntu Docker builder."
@echo "test-sdist-via-docker-ubuntu - Make an sdist packange and test it using an Ubuntu Docker container."
@echo "test-wheel-via-docker-ubuntu - Make a wheel package and test it using an Ubuntu Docker container."
@echo "runserver - Run the development server."
@echo "runserver_plus - Run the Django extension's development server."
@echo "shell_plus - Run the shell_plus command."
@echo "docker_services_on - Launch and initialize production-like services using Docker (Postgres and Redis)."
@echo "docker_services_off - Stop and delete the Docker production-like services."
@echo "docker_services_frontend - Launch a front end instance that uses the production-like services."
@echo "docker_services_worker - Launch a worker instance that uses the production-like services."
@echo "docker_service_mysql_on - Launch and initialize a MySQL Docker container."
@echo "docker_service_mysql_off - Stop and delete the MySQL Docker container."
@echo "docker_service_postgres_on - Launch and initialize a PostgreSQL Docker container."
@echo "docker_service_postgres_off - Stop and delete the PostgreSQL Docker container."
@echo "safety_check - Run a package safety check."
@echo "test-with-docker-services-on - Launch and initialize production-like services using Docker (Postgres and Redis)."
@echo "test-with-docker-services-off - Stop and delete the Docker production-like services."
@echo "test-with-docker-frontend - Launch a front end instance that uses the production-like services."
@echo "test-with-docker-worker - Launch a worker instance that uses the production-like services."
@echo "docker-mysql-on - Launch and initialize a MySQL Docker container."
@echo "docker-mysql-off - Stop and delete the MySQL Docker container."
@echo "docker-postgres-on - Launch and initialize a PostgreSQL Docker container."
@echo "docker-postgres-off - Stop and delete the PostgreSQL Docker container."
@echo "safety-check - Run a package safety check."
# Cleaning
@@ -68,15 +62,16 @@ clean-pyc:
find . -name '*.pyc' -exec rm -f {} +
find . -name '*.pyo' -exec rm -f {} +
find . -name '*~' -exec rm -f {} +
find . -name '__pycache__' -exec rm -R -f {} +
# Testing
test:
./manage.py test $(MODULE) --settings=mayan.settings.testing --nomigrations
./manage.py test $(MODULE) --settings=mayan.settings.testing.development --nomigrations $(ARGUMENTS)
test-all:
./manage.py test --mayan-apps --settings=mayan.settings.testing --nomigrations
./manage.py test --mayan-apps --settings=mayan.settings.testing.development --nomigrations $(ARGUMENTS)
test-launch-postgres:
@docker rm -f test-postgres || true
@@ -136,44 +131,43 @@ test-with-oracle-all: test-launch-oracle
# Documentation
docs_serve:
docs-serve:
cd docs;make livehtml
docs-spellcheck:
sphinx-build -b spelling -d docs/_build/ docs docs/_build/spelling
# Translations
translations_make:
translations-make:
contrib/scripts/process_messages.py -m
translations_compile:
translations-compile:
contrib/scripts/process_messages.py -c
translations_push:
translations-push:
tx push -s
translations_pull:
translations-pull:
tx pull -f
# Requirements
requirements_dev:
pip install -r requirements/development.txt
requirements_docs:
pip install -r requirements/documentation.txt
requirements_testing:
pip install -r requirements/testing.txt
generate_setup:
generate-setup:
@./generate_setup.py
@echo "Complete."
# Releases
increase-version:
@VERSION=`grep "__version__ =" mayan/__init__.py| cut -d\' -f 2|./increase_version.py - $(PART)`; \
BUILD=`echo $$VERSION|awk '{split($$VERSION,a,"."); printf("0x%02d%02d%02d\n", a[1],a[2], a[3])}'`; \
sed -i -e "s/__build__ = 0x[0-9]*/__build__ = $${BUILD}/g" mayan/__init__.py; \
sed -i -e "s/__version__ = '[0-9\.]*'/__version__ = '$${VERSION}'/g" mayan/__init__.py; \
echo $$VERSION > docker/version
make generate-setup
test_release: clean wheel
test-release: clean wheel
twine upload dist/* -r testpypi
@echo "Test with: pip install -i https://testpypi.python.org/pypi mayan-edms"
@@ -188,7 +182,7 @@ wheel: clean sdist
pip wheel --no-index --no-deps --wheel-dir dist dist/*.tar.gz
ls -l dist
release_test_via_docker_ubuntu:
release-test-via-docker-ubuntu:
docker run --rm --name mayan_release -v $(HOME):/host_home:ro -v `pwd`:/host_source -w /source ubuntu:16.04 /bin/bash -c "\
echo "LC_ALL=\"en_US.UTF-8\"" >> /etc/default/locale && \
locale-gen en_US.UTF-8 && \
@@ -199,48 +193,23 @@ release_test_via_docker_ubuntu:
apt-get install make python-pip -y && \
pip install -r requirements/build.txt && \
cp -r /host_home/.pypirc ~/.pypirc && \
make test_release"
make test-release"
release_via_docker_ubuntu:
release-via-docker-ubuntu:
docker run --rm --name mayan_release -v $(HOME):/host_home:ro -v `pwd`:/host_source -w /source ubuntu:16.04 /bin/bash -c "\
apt-get update && \
apt-get -y install locales && \
echo "LC_ALL=\"en_US.UTF-8\"" >> /etc/default/locale && \
locale-gen en_US.UTF-8 && \
update-locale LANG=en_US.UTF-8 && \
export LC_ALL=en_US.UTF-8 && \
cp -r /host_source/* . && \
apt-get update && \
apt-get install make python-pip -y && \
pip install -r requirements/build.txt && \
cp -r /host_home/.pypirc ~/.pypirc && \
make release"
release_test_via_docker_alpine:
docker run --rm --name mayan_release -v $(HOME):/host_home:ro -v `pwd`:/host_source -w /source alpine /bin/busybox sh -c "\
echo "LC_ALL=\"en_US.UTF-8\"" >> /etc/default/locale && \
locale-gen en_US.UTF-8 && \
update-locale LANG=en_US.UTF-8 && \
export LC_ALL=en_US.UTF-8 && \
cp -r /host_source/* . && \
apk update && \
apk add python2 py2-pip make && \
pip install -r requirements/build.txt && \
cp -r /host_home/.pypirc ~/.pypirc && \
make test_release"
release_via_docker_alpine:
docker run --rm --name mayan_release -v $(HOME):/host_home:ro -v `pwd`:/host_source -w /source alpine /bin/busybox sh -c "\
echo "LC_ALL=\"en_US.UTF-8\"" >> /etc/default/locale && \
locale-gen en_US.UTF-8 && \
update-locale LANG=en_US.UTF-8 && \
export LC_ALL=en_US.UTF-8 && \
cp -r /host_source/* . && \
apk update && \
apk add python2 py2-pip make && \
pip install -r requirements/build.txt && \
cp -r /host_home/.pypirc ~/.pypirc && \
make release"
test_sdist_via_docker_ubuntu:
test-sdist-via-docker-ubuntu:
docker run --rm --name mayan_sdist_test -v $(HOME):/host_home:ro -v `pwd`:/host_source -w /source ubuntu:16.04 /bin/bash -c "\
cp -r /host_source/* . && \
echo "LC_ALL=\"en_US.UTF-8\"" >> /etc/default/locale && \
@@ -250,10 +219,10 @@ test_sdist_via_docker_ubuntu:
apt-get update && \
apt-get install make python-pip libreoffice tesseract-ocr tesseract-ocr-deu poppler-utils -y && \
pip install -r requirements/development.txt && \
make sdist_test_suit \
make sdist-test-suit \
"
test_wheel_via_docker_ubuntu:
test-wheel-via-docker-ubuntu:
docker run --rm --name mayan_wheel_test -v $(HOME):/host_home:ro -v `pwd`:/host_source -w /source ubuntu:16.04 /bin/bash -c "\
cp -r /host_source/* . && \
echo "LC_ALL=\"en_US.UTF-8\"" >> /etc/default/locale && \
@@ -263,10 +232,10 @@ test_wheel_via_docker_ubuntu:
apt-get update && \
apt-get install make python-pip libreoffice tesseract-ocr tesseract-ocr-deu poppler-utils -y && \
pip install -r requirements/development.txt && \
make wheel_test_suit \
make wheel-test-suit \
"
sdist_test_suit: sdist
sdist-test-suit: sdist
rm -f -R _virtualenv
virtualenv _virtualenv
sh -c '\
@@ -277,7 +246,7 @@ sdist_test_suit: sdist
_virtualenv/bin/mayan-edms.py test --mayan-apps \
'
wheel_test_suit: wheel
wheel-test-suit: wheel
rm -f -R _virtualenv
virtualenv _virtualenv
sh -c '\
@@ -291,50 +260,78 @@ wheel_test_suit: wheel
# Dev server
runserver:
./manage.py runserver --settings=mayan.settings.development
./manage.py runserver --settings=mayan.settings.development $(ADDRPORT)
runserver_plus:
./manage.py runserver_plus --settings=mayan.settings.development
./manage.py runserver_plus --settings=mayan.settings.development $(ADDRPORT)
shell_plus:
./manage.py shell_plus --settings=mayan.settings.development
docker_services_on:
test-with-docker-services-on:
docker run -d --name redis -p 6379:6379 redis
docker run -d --name postgres -p 5432:5432 postgres
while ! nc -z 127.0.0.1 6379; do sleep 1; done
while ! nc -z 127.0.0.1 5432; do sleep 1; done
sleep 2
sleep 4
./manage.py initialsetup --settings=mayan.settings.staging.docker
docker_services_off:
test-with-docker-services-off:
docker stop postgres redis
docker rm postgres redis
docker_services_frontend:
test-with-docker-frontend:
./manage.py runserver --settings=mayan.settings.staging.docker
docker_services_worker:
./manage.py celery worker --settings=mayan.settings.staging.docker -B -l INFO -O fair
test-with-docker-worker:
./manage.py celery worker --settings=mayan.settings.staging.docker -B -l INFO
docker_service_mysql_on:
docker-mysql-on:
docker run -d --name mysql -p 3306:3306 -e MYSQL_ALLOW_EMPTY_PASSWORD=True -e MYSQL_DATABASE=mayan_edms mysql
while ! nc -z 127.0.0.1 3306; do sleep 1; done
docker_service_mysql_off:
docker-mysql-off:
docker stop mysql
docker rm mysql
docker_service_postgres_on:
docker-postgres-on:
docker run -d --name postgres -p 5432:5432 postgres
while ! nc -z 127.0.0.1 5432; do sleep 1; done
docker_service_postgres_off:
docker-postgres-off:
docker stop postgres
docker rm postgres
# Security
safety_check:
safety-check:
safety check
# Other
find-gitignores:
@export FIND_GITIGNORES=`find -name '.gitignore'| wc -l`; \
if [ $${FIND_GITIGNORES} -gt 1 ] ;then echo "More than one .gitignore found."; fi
build:
docker rm -f mayan-edms-build || true && \
docker run --rm --name mayan-edms-build -v $(HOME):/host_home:ro -v `pwd`:/host_source -w /source python:2-slim sh -c "\
rm /host_source/dist -R || true && \
mkdir /host_source/dist || true && \
export LC_ALL=C.UTF-8 && \
cp -r /host_source/* . && \
apt-get update && \
apt-get install -y make && \
pip install -r requirements/build.txt && \
make wheel && \
cp dist/* /host_source/dist/"
check-readme:
python setup.py check -r -s
check-missing-migrations:
./manage.py makemigrations --dry-run --noinput --check
include docker/Makefile

View File

@@ -3,6 +3,9 @@
[![coverage][cover]][cover-url]
![python][python]
![license][license]
[![Docker pulls](https://img.shields.io/docker/pulls/mayanedms/mayanedms.svg?maxAge=3600)](https://hub.docker.com/r/mayanedms/mayanedms/)
[![Docker Stars](https://img.shields.io/docker/stars/mayanedms/mayanedms.svg?maxAge=3600)](https://hub.docker.com/r/mayanedms/mayanedms/)
[![Docker layers](https://images.microbadger.com/badges/image/mayanedms/mayanedms.svg)](https://microbadger.com/images/mayanedms/mayanedms)
[pypi]: http://img.shields.io/pypi/v/mayan-edms.svg
[pypi-url]: http://badge.fury.io/py/mayan-edms
@@ -35,7 +38,7 @@
<p>
<p align="center">
<img src="https://gitlab.com/mayan-edms/mayan-edms/raw/master/docs/_static/overview.gif">
<img width="400" src="https://gitlab.com/mayan-edms/mayan-edms/raw/master/docs/_static/overview.gif">
</p>
</div>
@@ -46,9 +49,8 @@ The easiest way to use Mayan EDMS is by using the official
[Docker](https://www.docker.com/) image. Make sure Docker is properly installed
and working before attempting to install Mayan EDMS.
For the complete set of installation, configuration, upgrade, and backup
instructions visit the Mayan EDMS Docker Hub page at:
https://hub.docker.com/r/mayanedms/mayanedms/
For the complete set of installation instructions visit the Mayan EDMS documentation
at: https://docs.mayan-edms.com/topics/installation.html
<h2 align="center">Hardware requirements</h2>
@@ -59,14 +61,12 @@ https://hub.docker.com/r/mayanedms/mayanedms/
- [Homepage](http://www.mayan-edms.com)
- [Videos](https://www.youtube.com/channel/UCJOOXHP1MJ9lVA7d8ZTlHPw)
- [Documentation](http://mayan.readthedocs.io/en/stable/)
- [Paid support](http://www.mayan-edms.com/providers/)
- [Roadmap](https://gitlab.com/mayan-edms/mayan-edms/wikis/roadmap)
- [Documentation](https://docs.mayan-edms.com)
- [Wiki](https://wiki.mayan-edms.com/)
- [Contributing](https://gitlab.com/mayan-edms/mayan-edms/blob/master/CONTRIBUTING.md)
- [Community forum](https://groups.google.com/forum/#!forum/mayan-edms)
- [Community forum archive](http://mayan-edms.1003.x6.nabble.com/)
- [Forum](https://forum.mayan-edms.com/)
- [Source code, issues, bugs](https://gitlab.com/mayan-edms/mayan-edms)
- [Plug-ins, other related projects](https://gitlab.com/mayan-edms/)
- [Translations](https://www.transifex.com/rosarior/mayan-edms/)
- [Videos](https://www.youtube.com/channel/UCJOOXHP1MJ9lVA7d8ZTlHPw)

View File

@@ -1,4 +1,4 @@
|pypi| |builds| |coverage| |python| |license|
|pypi| |builds| |coverage| |python| |license| |docker_pulls| |docker_stars| |docker_layers|
.. image:: https://gitlab.com/mayan-edms/mayan-edms/raw/master/docs/_static/mayan_logo.png
@@ -14,15 +14,14 @@ are its workflow system, role based access control, and REST API.
.. image:: https://gitlab.com/mayan-edms/mayan-edms/raw/master/docs/_static/overview.gif
:align: center
:width: 300
The easiest way to use Mayan EDMS is by using the official Docker_ image.
Make sure Docker is properly installed and working before attempting to install
Mayan EDMS.
For the complete set of installation, configuration, upgrade, and backup
instructions visit the Mayan EDMS Docker Hub page at:
https://hub.docker.com/r/mayanedms/mayanedms/
For the complete set of installation instructions visit the Mayan EDMS documentation
at: https://docs.mayan-edms.com/topics/installation.html
.. _Docker: https://www.docker.com/
@@ -35,17 +34,14 @@ Hardware requirements
Important links
- `Homepage <http://www.mayan-edms.com>`__
- `Videos <https://www.youtube.com/channel/UCJOOXHP1MJ9lVA7d8ZTlHPw>`__
- `Documentation <http://mayan.readthedocs.io/en/stable/>`__
- `Paid support <http://www.mayan-edms.com/providers/>`__
- `Roadmap <https://gitlab.com/mayan-edms/mayan-edms/wikis/roadmap>`__
- `Documentation <https://docs.mayan-edms.com>`__
- `Wiki <https://wiki.mayan-edms.com>`__
- `Contributing <https://gitlab.com/mayan-edms/mayan-edms/blob/master/CONTRIBUTING.md>`__
- `Community forum <https://groups.google.com/forum/#!forum/mayan-edms>`__
- `Community forum archive <http://mayan-edms.1003.x6.nabble.com/>`__
- `Forum <https://forum.mayan-edms.com>`__
- `Source code, issues, bugs <https://gitlab.com/mayan-edms/mayan-edms>`__
- `Plug-ins, other related projects <https://gitlab.com/mayan-edms/>`__
- `Translations <https://www.transifex.com/rosarior/mayan-edms/>`__
- `Videos <https://www.youtube.com/channel/UCJOOXHP1MJ9lVA7d8ZTlHPw>`__
.. |pypi| image:: http://img.shields.io/pypi/v/mayan-edms.svg
@@ -56,3 +52,9 @@ Important links
:target: https://codecov.io/gitlab/mayan-edms/mayan-edms?branch=master
.. |python| image:: https://img.shields.io/pypi/pyversions/mayan-edms.svg
.. |license| image:: https://img.shields.io/pypi/l/mayan-edms.svg?style=flat
.. |docker_pulls| image:: https://img.shields.io/docker/pulls/mayanedms/mayanedms.svg?maxAge=3600
:target: https://hub.docker.com/r/mayanedms/mayanedms/
.. |docker_stars| image:: https://img.shields.io/docker/stars/mayanedms/mayanedms.svg?maxAge=3600
:target: https://hub.docker.com/r/mayanedms/mayanedms/
.. |docker_layers| image:: https://images.microbadger.com/badges/image/mayanedms/mayanedms.svg
:target: https://microbadger.com/images/mayanedms/mayanedms

14
__init__.py.tmpl Normal file
View File

@@ -0,0 +1,14 @@
from __future__ import unicode_literals
__title__ = 'Mayan EDMS'
__version__ = '{{ version }}'
__build__ = {{ build }}
__build_string__ = '{{ build_string }}'
__django_version__ = '1.11'
__author__ = 'Roberto Rosario'
__author_email__ = 'roberto.rosario@mayan-edms.com'
__description__ = 'Free Open Source Electronic Document Management System'
__license__ = 'Apache 2.0'
__copyright_short__ = '2011-2018 Roberto Rosario'
__copyright__ = '{} {}'.format('Copyright', __copyright_short__)
__website__ = 'https://www.mayan-edms.com'

View File

@@ -0,0 +1,8 @@
#!/bin/sh
apt-get update
apt-get install -y --no-install-recommends tesseract-ocr-deu
$MAYAN_PIP_BIN install -r $DOCKER_ROOT/requirements-testing.txt
$MAYAN_BIN test --mayan-apps --settings=mayan.settings.testing

View File

@@ -18,7 +18,7 @@ sudo apt-get -qq update
sudo apt-get -y upgrade
echo -e "\n -> Installing core binaries \n"
sudo apt-get -y install git-core python-virtualenv gcc python-dev libjpeg-dev libpng-dev libtiff-dev tesseract-ocr poppler-utils libreoffice
sudo apt-get -y install exiftool git-core python-virtualenv gcc python-dev libjpeg-dev libpng-dev libtiff-dev tesseract-ocr poppler-utils libreoffice
echo -e "\n -> Cloning development branch of repository \n"
git clone /mayan-edms-repository/ $INSTALLATION_DIRECTORY

File diff suppressed because it is too large Load Diff

131
contrib/scripts/install/docker.sh Executable file
View File

@@ -0,0 +1,131 @@
#!/bin/sh
set -e
# This script is meant for quick & easy install via:
# $ curl -fsSL get.mayan-edms.com -o get-mayan-edms.sh
# $ sh get-mayan-edms.sh
#
# NOTE: Make sure to verify the contents of the script
# you downloaded matches the contents of docker.sh
# located at https://gitlab.com/mayan-edms/mayan-edms/blob/master/contrib/scripts/install/docker.sh
# before executing.
: ${VERBOSE:=true}
: ${INSTALL_DOCKER:=false}
: ${DELETE_VOLUMES:=false}
: ${DATABASE_USER:=mayan}
: ${DATABASE_NAME:=mayan}
: ${DATABASE_PASSWORD:=mayanuserpass}
: ${DOCKER_POSTGRES_IMAGE:=postgres:9.5}
: ${DOCKER_POSTGRES_CONTAINER:=mayan-edms-postgres}
: ${DOCKER_POSTGRES_VOLUME:=/docker-volumes/mayan-edms/postgres}
: ${DOCKER_POSTGRES_PORT:=5432}
: ${DOCKER_MAYAN_IMAGE:=mayanedms/mayanedms:latest}
: ${DOCKER_MAYAN_CONTAINER:=mayan-edms}
: ${DOCKER_MAYAN_VOLUME:=/docker-volumes/mayan-edms/media}
cat << EOF
███╗ ███╗ █████╗ ██╗ ██╗ █████╗ ███╗ ██╗
████╗ ████║██╔══██╗╚██╗ ██╔╝██╔══██╗████╗ ██║
██╔████╔██║███████║ ╚████╔╝ ███████║██╔██╗ ██║
██║╚██╔╝██║██╔══██║ ╚██╔╝ ██╔══██║██║╚██╗██║
██║ ╚═╝ ██║██║ ██║ ██║ ██║ ██║██║ ╚████║
╚═╝ ╚═╝╚═╝ ╚═╝ ╚═╝ ╚═╝ ╚═╝╚═╝ ╚═══╝
Docker deploy script
NOTE: Make sure to verify the contents of this script
matches the contents of docker.sh located at https://gitlab.com/mayan-edms/mayan-edms/blob/master/contrib/scripts/install/docker.sh before executing.
EOF
if [ "$VERBOSE" = true ]; then
echo "Variable values to be used:"
echo "---------------------------"
echo "INSTALL_DOCKER: $INSTALL_DOCKER"
echo "DELETE_VOLUMES: $DELETE_VOLUMES"
echo "DATABASE_USER: $DATABASE_USER"
echo "DATABASE_NAME: $DATABASE_NAME"
echo "DATABASE_PASSWORD: $DATABASE_PASSWORD"
echo "DOCKER_POSTGRES_IMAGE: $DOCKER_POSTGRES_IMAGE"
echo "DOCKER_POSTGRES_CONTAINER: $DOCKER_POSTGRES_CONTAINER"
echo "DOCKER_POSTGRES_VOLUME: $DOCKER_POSTGRES_VOLUME"
echo "DOCKER_POSTGRES_PORT: $DOCKER_POSTGRES_PORT"
echo "DOCKER_MAYAN_IMAGE: $DOCKER_MAYAN_IMAGE"
echo "DOCKER_MAYAN_CONTAINER: $DOCKER_MAYAN_CONTAINER"
echo "DOCKER_MAYAN_VOLUME: $DOCKER_MAYAN_VOLUME"
echo "\nStarting in 10 seconds."
sleep 10
fi
if [ "$INSTALL_DOCKER" = true ]; then
echo -n "* Installing Docker..."
curl -fsSL get.docker.com -o get-docker.sh >/dev/null
sh get-docker.sh >/dev/null 2>&1
rm get-docker.sh
echo "Done"
fi
if [ -z `which docker` ]; then
echo "Docker is not installed. Rerun this script with the variable INSTALL_DOCKER set to true."
exit 1
fi
echo -n "* Removing existing Mayan EDMS and PostgreSQL containers (no data will be lost)..."
true || docker stop $DOCKER_MAYAN_CONTAINER >/dev/null 2>&1
true || docker rm $DOCKER_MAYAN_CONTAINER >/dev/null 2>&1
true || docker stop $DOCKER_POSTGRES_CONTAINER >/dev/null 2>&1
true || docker rm $DOCKER_POSTGRES_CONTAINER >/dev/null 2>&1
echo "Done"
if [ "$DELETE_VOLUMES" = true ]; then
echo -n "* Deleting Docker volumes in 5 seconds (warning: this delete all document data)..."
sleep 5
true || rm DOCKER_MAYAN_VOLUME -Rf
true || rm DOCKER_POSTGRES_VOLUME -Rf
echo "Done"
fi
echo -n "* Pulling (downloading) the Mayan EDMS Docker image..."
docker pull $DOCKER_MAYAN_IMAGE >/dev/null
echo "Done"
echo -n "* Pulling (downloading) the PostgreSQL Docker image..."
docker pull $DOCKER_POSTGRES_IMAGE > /dev/null
echo "Done"
echo -n "* Deploying the PostgreSQL container..."
docker run -d \
--name $DOCKER_POSTGRES_CONTAINER \
--restart=always \
-p $DOCKER_POSTGRES_PORT:5432 \
-e POSTGRES_USER=$DATABASE_USER \
-e POSTGRES_DB=$DATABASE_NAME \
-e POSTGRES_PASSWORD=$DATABASE_PASSWORD \
-v $DOCKER_POSTGRES_VOLUME:/var/lib/postgresql/data \
$DOCKER_POSTGRES_IMAGE >/dev/null
echo "Done"
echo -n "* Waiting for the PostgreSQL container to be ready (10 seconds)..."
sleep 10
echo "Done"
echo -n "* Deploying Mayan EDMS container..."
docker run -d \
--name $DOCKER_MAYAN_CONTAINER \
--restart=always \
-p 80:8000 \
-e MAYAN_DATABASE_ENGINE=django.db.backends.postgresql \
-e MAYAN_DATABASE_HOST=172.17.0.1 \
-e MAYAN_DATABASE_NAME=$DATABASE_NAME \
-e MAYAN_DATABASE_PASSWORD=$DATABASE_PASSWORD \
-e MAYAN_DATABASE_USER=$DATABASE_USER \
-e MAYAN_DATABASE_PORT=$DOCKER_POSTGRES_PORT \
-e MAYAN_DATABASE_CONN_MAX_AGE=60 \
-v $DOCKER_MAYAN_VOLUME:/var/lib/mayan \
$DOCKER_MAYAN_IMAGE >/dev/null
echo "Done"
echo -n "* Waiting for the Mayan EDMS container to be ready (might take a few minutes)..."
while ! curl --output /dev/null --silent --head --fail http://localhost:80; do sleep 1 && echo -n .; done;
echo "Done"

View File

@@ -20,7 +20,7 @@ apt-get -qq update
apt-get -y upgrade
echo -e "\n -> Installing core binaries \n"
apt-get install nginx supervisor redis-server postgresql libpq-dev libjpeg-dev libmagic1 libpng-dev libreoffice libtiff-dev gcc ghostscript gpgv python-dev python-virtualenv tesseract-ocr poppler-utils -y
apt-get install exiftool nginx supervisor redis-server postgresql libpq-dev libjpeg-dev libmagic1 libpng-dev libreoffice libtiff-dev gcc ghostscript gpgv python-dev python-virtualenv tesseract-ocr poppler-utils -y
echo -e "\n -> Setting up virtualenv \n"
rm -f ${INSTALLATION_DIRECTORY}
@@ -133,7 +133,7 @@ EOF
echo -e "\n -> Creating the supervisor file for the Celery worker, /etc/supervisor/conf.d/mayan-celery.conf \n"
cat > /etc/supervisor/conf.d/mayan-celery.conf << EOF
[program:mayan-worker]
command = ${INSTALLATION_DIRECTORY}bin/python ${INSTALLATION_DIRECTORY}bin/mayan-edms.py celery --settings=mayan.settings.production worker -Ofair -l ERROR
command = ${INSTALLATION_DIRECTORY}bin/python ${INSTALLATION_DIRECTORY}bin/mayan-edms.py celery --settings=mayan.settings.production worker -l ERROR
directory = ${INSTALLATION_DIRECTORY}
user = www-data
stdout_logfile = /var/log/mayan/worker-stdout.log
@@ -161,7 +161,7 @@ priority = 998
EOF
echo -e "\n -> Collecting the static files \n"
mayan-edms.py collectstatic --noinput
mayan-edms.py preparestatic --noinput
echo -e "\n -> Making the installation directory readable and writable by the webserver user \n"
chown www-data:www-data ${INSTALLATION_DIRECTORY} -R

View File

@@ -1,4 +1,7 @@
#!/usr/bin/env python
from __future__ import print_function
import os
import optparse
@@ -6,13 +9,14 @@ import sh
APP_LIST = (
'acls', 'appearance', 'authentication', 'cabinets', 'checkouts', 'common',
'converter', 'django_gpg', 'document_comments', 'document_indexing',
'document_parsing', 'document_signatures', 'document_states', 'documents',
'dynamic_search', 'events', 'linking', 'lock_manager', 'mayan_statistics',
'mailer', 'metadata', 'mirroring', 'motd', 'navigation', 'ocr', 'permissions',
'rest_api', 'smart_settings', 'sources', 'storage', 'tags', 'task_manager',
'user_management'
'acls', 'appearance', 'authentication', 'autoadmin', 'cabinets',
'checkouts', 'common', 'converter', 'dashboards', 'django_gpg',
'document_comments', 'document_indexing', 'document_parsing',
'document_signatures', 'document_states', 'documents', 'dynamic_search',
'events', 'file_caching', 'linking', 'lock_manager', 'mayan_statistics',
'mailer', 'metadata', 'mirroring', 'motd', 'navigation', 'ocr',
'permissions', 'rest_api', 'smart_settings', 'sources', 'storage',
'tags', 'task_manager', 'user_management'
)
LANGUAGE_LIST = (
@@ -38,29 +42,29 @@ BASE_DIR = os.path.abspath(
def process(command, app_list, language_list):
if command == makemessages:
print 'Making messages'
print('Making messages')
elif command == compilemessages:
print 'Compiling messages'
print('Compiling messages')
elif command == pull_translations:
print 'Pulling translation files'
print('Pulling translation files')
elif command == push_translations:
print 'Pushing translation files'
print('Pushing translation files')
if command in [compilemessages, makemessages]:
for app in app_list:
print 'Processing app: %s...' % app
print('Processing app: %s...' % app)
app_path = os.path.join(BASE_DIR, 'apps', app)
os.chdir(app_path)
for lang in language_list:
print 'Doing language: %s' % lang
print('Doing language: %s' % lang)
command(locale=lang)
elif command == pull_translations:
for lang in language_list:
print 'Doing language: %s' % lang
print('Doing language: %s' % lang)
command('-f', '-l', lang)
elif command == push_translations:
for lang in language_list:
print 'Doing language: %s' % lang
print('Doing language: %s' % lang)
command('-s', '-l', lang)

105
contrib/scripts/statistics.py Executable file
View File

@@ -0,0 +1,105 @@
#!/usr/bin/env python
from __future__ import print_function
import os
BASE_PATH = 'mayan/apps'
def print_views_summary(module_filename):
with open(module_filename) as file_object:
print(' module:', module_filename)
count_class_based_views = 0
count_function_based_views = 0
for line in file_object:
if line.startswith('class') and 'View' in line:
count_class_based_views += 1
if line.startswith('def') and 'request' in line:
count_function_based_views += 1
print(' class based views: {}'.format(count_class_based_views))
print(' function based views: {}'.format(count_function_based_views))
return count_class_based_views, count_function_based_views
def print_tests_summary(module_filename):
with open(module_filename) as file_object:
print(' module:', module_filename)
count_tests = 0
for line in file_object:
if line.startswith(' def test'):
count_tests += 1
print(' tests: {}'.format(count_tests))
return count_tests
if __name__ == '__main__':
count_totals = {
'Apps': 0,
'Class based views': 0,
'Function based views': 0,
'Class based API views': 0,
'Function based API views': 0,
'Tests': 0,
}
for app_name in sorted(os.listdir(BASE_PATH)):
if app_name != '__init__.py':
count_totals['Apps'] += 1
print('\n\nApp name: {}'.format(app_name))
app_path = os.path.join(BASE_PATH, app_name)
print('\n Views')
try:
module_filename = os.path.join(app_path, 'views.py')
count_class_based_views, count_function_based_views = print_views_summary(module_filename=module_filename)
count_totals['Class based views'] += count_class_based_views
count_totals['Function based views'] += count_function_based_views
except IOError:
# Check for multiple view files inside a view directory
try:
module_path = os.path.join(app_path, 'views')
for module_name in os.listdir(module_path):
if not module_name.startswith('__init__.py') and not module_name.endswith('.pyc'):
module_filename = os.path.join(module_path, module_name)
count_class_based_views, count_function_based_views = print_views_summary(module_filename=module_filename)
count_totals['Class based views'] += count_class_based_views
count_totals['Function based views'] += count_function_based_views
except OSError:
# No views directory, skip app
print(' No views')
print('\n API Views')
try:
module_filename = os.path.join(app_path, 'api_views.py')
count_class_based_views, count_function_based_views = print_views_summary(module_filename=module_filename)
count_totals['Class based API views'] += count_class_based_views
count_totals['Function based API views'] += count_function_based_views
except IOError:
# No API views directory, skip app
print(' No API views')
print('\n Tests')
module_path = os.path.join(app_path, 'tests')
try:
for module_name in os.listdir(module_path):
if not module_name.startswith('__init__.py') and not module_name.endswith('.pyc'):
module_filename = os.path.join(module_path, module_name)
if module_name.startswith('test'):
count_tests = print_tests_summary(module_filename=module_filename)
count_totals['Tests'] += count_tests
except OSError:
# No tests directory, skip app
print(' No tests')
print('-' * 10)
print('Totals:')
for key, value in count_totals.items():
print(' {}: {}'.format(key, value))

View File

@@ -3,8 +3,7 @@ from __future__ import absolute_import
import ldap
from django_auth_ldap.config import LDAPSearch
from .base import *
from django.conf import settings
from .base import * # NOQA
from django.contrib.auth import get_user_model
SECRET_KEY = '<your secret key>'
@@ -27,22 +26,24 @@ AUTH_LDAP_BIND_DN = LDAP_ADMIN_DN
AUTH_LDAP_BIND_PASSWORD = LDAP_PASSWORD
AUTH_LDAP_USER_SEARCH = LDAPSearch('%s,%s'%(LDAP_ADDITIONAL_USER_DN, LDAP_BASE_DN), ldap.SCOPE_SUBTREE, "(uid=%(user)s)")
AUTH_LDAP_USER_ATTR_MAP = {
"first_name": "cn",
"last_name": "sn",
"email": "mail"
}
AUTHENTICATION_BACKENDS = (
'django_auth_ldap.backend.LDAPBackend',
'mayan.settings.settings_local.EmailOrUsernameModelBackend',
AUTH_LDAP_USER_SEARCH = LDAPSearch(
'%s,%s' % (LDAP_ADDITIONAL_USER_DN, LDAP_BASE_DN),
ldap.SCOPE_SUBTREE, '(uid=%(user)s)'
)
AUTH_LDAP_USER_ATTR_MAP = {
'first_name': 'cn',
'last_name': 'sn',
'email': 'mail'
}
AUTHENTICATION_BACKENDS = (
'django_auth_ldap.backend.LDAPBackend',
'mayan.settings.settings_local.EmailOrUsernameModelBackend',
)
class EmailOrUsernameModelBackend(object):
"""
This is a ModelBacked that allows authentication with either a username or an email address.
"""
def authenticate(self, username=None, password=None):
if '@' in username:
@@ -53,7 +54,7 @@ class EmailOrUsernameModelBackend(object):
user = get_user_model().objects.get(**kwargs)
if user.check_password(password):
return user
except User.DoesNotExist:
except get_user_model().DoesNotExist:
return None
def get_user(self, username):

165
docker/Dockerfile Executable file
View File

@@ -0,0 +1,165 @@
# vim:set ft=dockerfile:
####################
# Base image start #
####################
FROM debian:9.4-slim as BASE_IMAGE
MAINTAINER Roberto Rosario "roberto.rosario@mayan-edms.com"
ENV DEBIAN_FRONTEND noninteractive
ENV PYTHONUNBUFFERED 1
ENV LC_ALL C.UTF-8
ENV PROJECT_INSTALL_DIR=/opt/mayan-edms
ENV PYTHON_PIP=${PROJECT_INSTALL_DIR}/bin/pip
ARG APT_PROXY
# Package caching
RUN if [ "${APT_PROXY}" ]; then echo "Acquire::http { Proxy \"http://${APT_PROXY}\"; };" > /etc/apt/apt.conf.d/01proxy; fi
# Install base Ubuntu libraries
RUN apt-get update && \
apt-get install -y --no-install-recommends \
exiftool \
g++ \
gcc \
ghostscript \
gpgv \
gnupg1 \
graphviz \
libffi-dev \
libfuse2 \
libjpeg-dev \
libmagic1 \
default-libmysqlclient-dev \
libpng-dev \
libpq-dev \
libreoffice \
libtiff-dev \
poppler-utils \
python-dev \
python-setuptools \
python-virtualenv \
python-wheel \
redis-server \
sane-utils \
sudo \
supervisor \
tesseract-ocr \
zlib1g-dev \
libssl-dev \
&& \
apt-get clean autoclean && \
apt-get autoremove --purge -y && \
rm -rf /var/lib/apt/lists/* && \
rm -f /var/cache/apt/archives/*.deb
# Install apt-get-install
ADD https://raw.githubusercontent.com/guilhem/apt-get-install/master/apt-get-install /usr/bin/
RUN chmod +x /usr/bin/apt-get-install
RUN adduser mayan --disabled-password --disabled-login --no-create-home --gecos ""
# Pillow can't find zlib or libjpeg on aarch64 (ODROID C2)
RUN if [ "$(uname -m)" = "aarch64" ]; then \
ln -s /usr/lib/aarch64-linux-gnu/libz.so /usr/lib/ && \
ln -s /usr/lib/aarch64-linux-gnu/libjpeg.so /usr/lib/ \
; fi
# Pillow can't find zlib or libjpeg on armv7l (ODROID HC1)
RUN if [ "$(uname -m)" = "armv7l" ]; then \
ln -s /usr/lib/arm-linux-gnueabihf/libz.so /usr/lib/ && \
ln -s /usr/lib/arm-linux-gnueabihf/libjpeg.so /usr/lib/ \
; fi
# Discard data when Redis runs out of memory
RUN echo "maxmemory-policy allkeys-lru" >> /etc/redis/redis.conf
# Disable saving the Redis database
RUN echo "save \"\"" >> /etc/redis/redis.conf
# Only provision 1 database
RUN echo "databases 1" >> /etc/redis/redis.conf
#####################
# Build image start #
#####################
FROM debian:9.4-slim as BUILDER_IMAGE
ARG APT_PROXY
# Package caching
RUN if [ "${APT_PROXY}" ]; then echo "Acquire::http { Proxy \"http://${APT_PROXY}\"; };" > /etc/apt/apt.conf.d/01proxy; fi
WORKDIR /code
COPY . /code
RUN apt-get update && apt-get install make python-dev python-pip -y
RUN pip install -r requirements/build.txt
ENV LC_ALL C.UTF-8
RUN touch docker/Makefile
RUN make wheel
RUN chmod 777 dist -R
#####################
# Final image start #
#####################
FROM BASE_IMAGE
RUN mkdir -p /opt
RUN python /usr/lib/python2.7/dist-packages/virtualenv.py $PROJECT_INSTALL_DIR
WORKDIR $PROJECT_INSTALL_DIR
COPY --from=BUILDER_IMAGE /code/dist/*.whl .
COPY --from=BUILDER_IMAGE /code/contrib/scripts/docker/run-tests.sh .
COPY --from=BUILDER_IMAGE /code/requirements/testing-base.txt requirements-testing.txt
COPY --from=BUILDER_IMAGE /code/docker/version .
# Fix ownership
RUN chown -R mayan:mayan $PROJECT_INSTALL_DIR
# Install build Mayan EDMS
RUN sudo -u mayan $PYTHON_PIP install --no-cache-dir --no-use-pep517 *.whl && \
rm *.whl
# Install Python clients for librabbitmq, MySQL, PostgreSQL, REDIS
RUN sudo -u mayan $PYTHON_PIP install --no-cache-dir --no-use-pep517 librabbitmq==1.6.1 mysql-python==1.2.5 psycopg2==2.7.3.2 redis==2.10.6
# Setup supervisor
COPY docker/etc/supervisor/mayan.conf /etc/supervisor/conf.d
RUN mkdir /var/lib/mayan
VOLUME ["/var/lib/mayan"]
COPY docker/entrypoint.sh /usr/local/bin/
RUN ln -s usr/local/bin/entrypoint.sh / # backwards compat
ENTRYPOINT ["entrypoint.sh"]
EXPOSE 8000
CMD ["mayan"]
RUN rm /root/.cache -R
RUN rm -rf /tmp/*
RUN apt-get -y autoremove --purge && apt-get -y autoclean && apt-get -y clean
RUN rm -rf /usr/share/man/*
RUN rm -rf /usr/share/doc/*
RUN find /var/lib/apt -type f | xargs rm -f
RUN find /var/cache -type f -exec rm -rf {} \;
RUN find /var/log -type f | while read f; do echo -ne '' > $f; done;

150
docker/Dockerfile.ubuntu Executable file
View File

@@ -0,0 +1,150 @@
# vim:set ft=dockerfile:
####################
# Base image start #
####################
FROM ubuntu:16.04 as BASE_IMAGE
MAINTAINER Roberto Rosario "roberto.rosario@mayan-edms.com"
ENV DEBIAN_FRONTEND noninteractive
ENV PYTHONUNBUFFERED 1
ENV LANG en_US.UTF-8
ENV PROJECT_INSTALL_DIR=/usr/local/lib/python2.7/dist-packages/mayan
ARG APT_PROXY
# Package caching
RUN if [ "${APT_PROXY}" ]; then echo "Acquire::http { Proxy \"http://${APT_PROXY}\"; };" > /etc/apt/apt.conf.d/01proxy; fi
# Install base Ubuntu libraries
RUN apt-get update && \
apt-get install -y --no-install-recommends \
curl \
g++ \
gcc \
gettext-base \
ghostscript \
gpgv \
graphviz \
libffi-dev \
libjpeg-dev \
libmagic1 \
libmysqlclient-dev \
libpng-dev \
libpq-dev \
libreoffice \
libtiff-dev \
locales \
netcat-openbsd \
poppler-utils \
python-dev \
python-pip \
python-setuptools \
python-wheel \
redis-server \
supervisor \
tesseract-ocr \
zlib1g-dev \
&& \
apt-get clean autoclean && \
apt-get autoremove --purge -y && \
rm -rf /var/lib/apt/lists/* && \
rm -f /var/cache/apt/archives/*.deb
# Switch to UTF locale
RUN echo "LC_ALL=\"en_US.UTF-8\"" >> /etc/default/locale && \
locale-gen en_US.UTF-8 && \
update-locale LANG=en_US.UTF-8 && \
export LC_ALL=en_US.UTF-8
# Install apt-get-install
ADD https://raw.githubusercontent.com/guilhem/apt-get-install/master/apt-get-install /usr/bin/
RUN chmod +x /usr/bin/apt-get-install
# Install Python clients for PostgreSQL, REDIS, librabbitmq
RUN pip install psycopg2==2.7.3.2 redis==2.10.6 mysql-python==1.2.5 librabbitmq==1.6.1
RUN adduser mayan --disabled-password --disabled-login --no-create-home --gecos ""
# Pillow can't find zlib or libjpeg on aarch64
RUN if [ "$(uname -m)" = "aarch64" ]; then \
ln -s /usr/lib/aarch64-linux-gnu/libz.so /usr/lib/ && \
ln -s /usr/lib/aarch64-linux-gnu/libjpeg.so /usr/lib/ \
; fi
#####################
# Build image start #
#####################
FROM python:2-alpine3.7 as BUILDER_IMAGE
WORKDIR /code
COPY . /code
RUN apk update && \
apk add make
RUN pip install -r requirements/build.txt
RUN make wheel
RUN chmod 777 dist -R
#####################
# Final image start #
#####################
FROM BASE_IMAGE
WORKDIR /root/
COPY --from=BUILDER_IMAGE /code/dist/*.whl .
# Install build Mayan EDMS
RUN pip install *.whl && \
rm *.whl
# Setup supervisor
#RUN mkdir /etc/supervisor.d/
COPY docker/etc/supervisor/beat.conf /etc/supervisor/conf.d
COPY docker/etc/supervisor/gunicorn.conf /etc/supervisor/conf.d
COPY docker/etc/supervisor/redis.conf /etc/supervisor/conf.d
COPY docker/etc/supervisor/workers.conf /etc/supervisor/conf.d
# Create the directory for the logs
RUN mkdir /var/log/mayan
# Fix ownership
RUN chown -R mayan:mayan $PROJECT_INSTALL_DIR
# Allow flanker to autogenerate its PLY files
RUN chown -R mayan:mayan /usr/local/lib/python2.7/dist-packages/flanker/
RUN mkdir /var/lib/mayan
VOLUME ["/var/lib/mayan"]
COPY docker/entrypoint.sh /usr/local/bin/
RUN ln -s usr/local/bin/entrypoint.sh / # backwards compat
ENTRYPOINT ["entrypoint.sh"]
# Healthcheck setup
HEALTHCHECK --interval=15s --timeout=1s --retries=20 \
CMD curl -s -f http://localhost/authentication/login/ | grep 'form' > /dev/null || exit 1
EXPOSE 8000
CMD ["mayan"]
RUN rm /root/.cache -R
RUN rm -rf /tmp/*
RUN apt-get -y autoremove --purge && apt-get -y autoclean && apt-get -y clean
RUN rm -rf /usr/share/man/*
RUN rm -rf /usr/share/doc/*
RUN find /var/lib/apt -type f | xargs rm -f
RUN find /var/cache -type f -exec rm -rf {} \;
RUN find /var/log -type f | while read f; do echo -ne '' > $f; done;

33
docker/Makefile Executable file
View File

@@ -0,0 +1,33 @@
APT_PROXY ?= `/sbin/ip route|awk '/docker0/ { print $$9 }'`:3142
IMAGE_VERSION ?= `cat docker/version`
CONSOLE_COLUMNS ?= `echo $$(tput cols)`
CONSOLE_LINES ?= `echo $$(tput lines)`
docker-help:
@echo
@echo "**** Docker makefile ****"
@echo "docker-build - Build a new image locally."
@echo "docker-build-with-proxy - Build a new image locally using an APT proxy."
@echo "docker-test-container - Build and run a test container."
@echo "docker-test-cleanup - Delete the test container and the test volume."
@echo "docker-test-all - Build and executed the test suite in a test container."
@echo "docker-shell - Launch a bash instance inside a running container. Pass the container name via DOCKER_CONTAINER."
docker-build:
docker build -t mayanedms/mayanedms:$(IMAGE_VERSION) -f docker/Dockerfile .
docker-build-with-proxy:
docker build -t mayanedms/mayanedms:$(IMAGE_VERSION) -f docker/Dockerfile --build-arg APT_PROXY=$(APT_PROXY) .
docker-shell:
docker exec -e TERM=$(TERM) -e "COLUMNS=$(CONSOLE_COLUMNS)" -e "LINES=$(CONSOLE_LINES)" -it $(DOCKER_CONTAINER) /bin/bash
docker-test-container: docker-build-with-proxy docker-test-cleanup
docker run -d --name test-mayan-edms -p 80:8000 -v test-mayan_data:/var/lib/mayan mayanedms/mayanedms:$(DOCKER_VERSION)
docker-test-cleanup:
@docker rm -f test-mayan-edms || true
@docker volume rm test-mayan_data || true
docker-test-all: docker-build-with-proxy
docker run --rm run-tests

1
docker/README-short.txt Executable file
View File

@@ -0,0 +1 @@
Mayan EDMS is a free open source electronic document management system.

554
docker/README.md Executable file

File diff suppressed because it is too large Load Diff

549
docker/README.md.tmpl Executable file

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,72 @@
version: '2.1'
volumes:
broker:
driver: local
app:
driver: local
db:
driver: local
results:
driver: local
services:
broker:
container_name: mayan-edms-broker
image: healthcheck/rabbitmq
environment:
RABBITMQ_DEFAULT_USER: mayan
RABBITMQ_DEFAULT_PASS: mayan
RABBITMQ_DEFAULT_VHOST: mayan
volumes:
- broker:/var/lib/rabbitmq
results:
container_name: mayan-edms-results
image: healthcheck/redis
volumes:
- results:/data
#db:
# container_name: mayan-edms-db
# image: healthcheck/mysql
# environment:
# MYSQL_DATABASE: mayan
# MYSQL_PASSWORD: mayan-password
# MYSQL_ROOT_PASSWORD: root-password
# MYSQL_USER: mayan
# volumes:
# - db:/var/lib/mysql
db:
container_name: mayan-edms-db
image: healthcheck/postgres
environment:
POSTGRES_DB: mayan
POSTGRES_PASSWORD: mayan-password
POSTGRES_USER: mayan
volumes:
- db:/var/lib/postgresql/data
mayan-edms:
container_name: mayan-edms-app
image: mayan-edms/next
build:
context: ./
args:
- APT_PROXY=172.18.0.1:3142
depends_on:
broker:
condition: service_healthy
db:
condition: service_healthy
results:
condition: service_healthy
environment:
MAYAN_CELERY_BROKER_URL: amqp://mayan:mayan@broker:5672/mayan
MAYAN_CELERY_RESULT_BACKEND: redis://results:6379/0
MAYAN_DATABASE_ENGINE: django.db.backends.postgresql
MAYAN_DATABASE_HOST: db
MAYAN_DATABASE_NAME: mayan
MAYAN_DATABASE_PASSWORD: mayan-password
MAYAN_DATABASE_USER: mayan
ports:
- "80:80"
volumes:
- app:/var/lib/mayan

58
docker/docker-compose.yml Executable file
View File

@@ -0,0 +1,58 @@
version: '2.1'
volumes:
broker:
driver: local
app:
driver: local
db:
driver: local
results:
driver: local
services:
broker:
container_name: mayan-edms-broker
image: healthcheck/rabbitmq
environment:
RABBITMQ_DEFAULT_USER: mayan
RABBITMQ_DEFAULT_PASS: mayan
RABBITMQ_DEFAULT_VHOST: mayan
volumes:
- broker:/var/lib/rabbitmq
results:
container_name: mayan-edms-results
image: healthcheck/redis
volumes:
- results:/data
db:
container_name: mayan-edms-db
image: healthcheck/postgres
environment:
POSTGRES_DB: mayan
POSTGRES_PASSWORD: mayan-password
POSTGRES_USER: mayan
volumes:
- db:/var/lib/postgresql/data
mayan-edms:
container_name: mayan-edms-app
image: mayanedms/mayanedms:latest
depends_on:
broker:
condition: service_healthy
db:
condition: service_healthy
results:
condition: service_healthy
environment:
MAYAN_CELERY_BROKER_URL: amqp://mayan:mayan@broker:5672/mayan
MAYAN_CELERY_RESULT_BACKEND: redis://results:6379/0
MAYAN_DATABASE_ENGINE: django.db.backends.postgresql
MAYAN_DATABASE_HOST: db
MAYAN_DATABASE_NAME: mayan
MAYAN_DATABASE_PASSWORD: mayan-password
MAYAN_DATABASE_USER: mayan
ports:
- "80:8000"
volumes:
- app:/var/lib/mayan

115
docker/entrypoint.sh Executable file
View File

@@ -0,0 +1,115 @@
#!/bin/sh
set -e
echo "mayan: starting entrypoint.sh"
INSTALL_FLAG=/var/lib/mayan/system/SECRET_KEY
CONCURRENCY_ARGUMENT=--concurrency=
export DOCKER_ROOT=/opt/mayan-edms
export MAYAN_DEFAULT_CELERY_BROKER_URL=redis://127.0.0.1:6379/0
export MAYAN_DEFAULT_CELERY_RESULT_BACKEND=redis://127.0.0.1:6379/0
export MAYAN_ALLOWED_HOSTS='["*"]'
export MAYAN_BIN=/opt/mayan-edms/bin/mayan-edms.py
export MAYAN_CELERY_BROKER_URL=${MAYAN_CELERY_BROKER_URL:-${MAYAN_DEFAULT_CELERY_BROKER_URL}}
export MAYAN_CELERY_RESULT_BACKEND=${MAYAN_CELERY_RESULT_BACKEND:-${MAYAN_DEFAULT_CELERY_RESULT_BACKEND}}
export MAYAN_INSTALL_DIR=/opt/mayan-edms
export MAYAN_PYTHON_BIN_DIR=/opt/mayan-edms/bin/
export MAYAN_MEDIA_ROOT=/var/lib/mayan
export MAYAN_SETTINGS_MODULE=${MAYAN_SETTINGS_MODULE:-mayan.settings.production}
export MAYAN_GUNICORN_BIN=${MAYAN_PYTHON_BIN_DIR}gunicorn
export MAYAN_GUNICORN_WORKERS=${MAYAN_GUNICORN_WORKERS:-2}
export MAYAN_PIP_BIN=${MAYAN_PYTHON_BIN_DIR}pip
MAYAN_WORKER_FAST_CONCURRENCY=${MAYAN_WORKER_FAST_CONCURRENCY:-1}
MAYAN_WORKER_MEDIUM_CONCURRENCY=${MAYAN_WORKER_MEDIUM_CONCURRENCY:-1}
MAYAN_WORKER_SLOW_CONCURRENCY=${MAYAN_WORKER_SLOW_CONCURRENCY:-1}
if [ "$MAYAN_WORKER_FAST_CONCURRENCY" -eq 0 ]; then
MAYAN_WORKER_FAST_CONCURRENCY=
else
MAYAN_WORKER_FAST_CONCURRENCY="${CONCURRENCY_ARGUMENT}${MAYAN_WORKER_FAST_CONCURRENCY}"
fi
export MAYAN_WORKER_FAST_CONCURRENCY
if [ "$MAYAN_WORKER_MEDIUM_CONCURRENCY" -eq 0 ]; then
MAYAN_WORKER_MEDIUM_CONCURRENCY=
else
MAYAN_WORKER_MEDIUM_CONCURRENCY="${CONCURRENCY_ARGUMENT}${MAYAN_WORKER_MEDIUM_CONCURRENCY}"
fi
export MAYAN_WORKER_MEDIUM_CONCURRENCY
if [ "$MAYAN_WORKER_SLOW_CONCURRENCY" -eq 0 ]; then
MAYAN_WORKER_SLOW_CONCURRENCY=
else
MAYAN_WORKER_SLOW_CONCURRENCY="${CONCURRENCY_ARGUMENT}${MAYAN_WORKER_SLOW_CONCURRENCY}"
fi
export MAYAN_WORKER_SLOW_CONCURRENCY
export CELERY_ALWAYS_EAGER=False
export PYTHONPATH=$PYTHONPATH:$MAYAN_MEDIA_ROOT
chown mayan:mayan /var/lib/mayan -R
initialize() {
echo "mayan: initialize()"
su mayan -c "${MAYAN_BIN} initialsetup --force"
su mayan -c "${MAYAN_BIN} preparestatic --noinput --clear"
}
upgrade() {
echo "mayan: upgrade()"
su mayan -c "${MAYAN_BIN} performupgrade"
su mayan -c "${MAYAN_BIN} preparestatic --noinput --clear"
}
start() {
echo "mayan: start()"
rm -rf /var/run/supervisor.sock
exec /usr/bin/supervisord -nc /etc/supervisor/supervisord.conf
}
os_package_installs() {
echo "mayan: os_package_installs()"
if [ "${MAYAN_APT_INSTALLS}" ]; then
apt-get-install $MAYAN_APT_INSTALLS
fi
}
pip_installs() {
echo "mayan: pip_installs()"
if [ "${MAYAN_PIP_INSTALLS}" ]; then
$MAYAN_PIP_BIN install $MAYAN_PIP_INSTALLS
fi
}
os_package_installs || true
pip_installs || true
case "$1" in
mayan) # Check if this is a new install, otherwise try to upgrade the existing
# installation on subsequent starts
if [ ! -f $INSTALL_FLAG ]; then
initialize
else
upgrade
fi
start
;;
run-tests) # Check if this is a new install, otherwise try to upgrade the existing
# installation on subsequent starts
if [ ! -f $INSTALL_FLAG ]; then
initialize
else
upgrade
fi
$DOCKER_ROOT/run-tests.sh
;;
*) su mayan -c "$@";
;;
esac

View File

@@ -0,0 +1,80 @@
[program:mayan-gunicorn]
autorestart = false
autostart = true
command = /bin/bash -c "${MAYAN_GUNICORN_BIN} -w ${MAYAN_GUNICORN_WORKERS} mayan.wsgi --max-requests 500 --max-requests-jitter 50 --worker-class gevent --bind 0.0.0.0:8000 --env DJANGO_SETTINGS_MODULE=${MAYAN_SETTINGS_MODULE}" --timeout 120
redirect_stderr = true
stderr_logfile = /dev/fd/2
stderr_logfile_maxbytes = 0
stdout_logfile = /dev/fd/1
stdout_logfile_maxbytes = 0
user = mayan
[program:redis]
autorestart = false
autostart = true
command = /bin/bash -c "if [ ${MAYAN_CELERY_BROKER_URL} == ${MAYAN_DEFAULT_BROKER_URL} ] && [ ${MAYAN_CELERY_RESULT_BACKEND} == ${MAYAN_DEFAULT_CELERY_RESULT_BACKEND} ];then /usr/bin/redis-server /etc/redis/;fi"
stderr_logfile = /dev/fd/2
stderr_logfile_maxbytes = 0
stdout_logfile = /dev/fd/1
stdout_logfile_maxbytes = 0
user = root
[program:mayan-worker-fast]
autorestart = false
autostart = true
command = nice -n 1 /bin/bash -c "${MAYAN_BIN} celery --settings=${MAYAN_SETTINGS_MODULE} worker -l ERROR -Q converter,document_states_fast,sources_fast -n mayan-worker-fast.%%h ${MAYAN_WORKER_FAST_CONCURRENCY}"
killasgroup = true
numprocs = 1
priority = 998
startsecs = 10
stderr_logfile = /dev/fd/2
stderr_logfile_maxbytes = 0
stdout_logfile = /dev/fd/1
stdout_logfile_maxbytes = 0
stopwaitsecs = 1
user = mayan
[program:mayan-worker-medium]
autorestart = false
autostart = true
command = nice -n 18 /bin/bash -c "${MAYAN_BIN} celery --settings=${MAYAN_SETTINGS_MODULE} worker -l ERROR -Q checkouts_periodic,documents_periodic,indexing,metadata,sources,sources_periodic,uploads,documents -n mayan-worker-medium.%%h ${MAYAN_WORKER_MEDIUM_CONCURRENCY}"
killasgroup = true
numprocs = 1
priority = 998
startsecs = 10
stderr_logfile = /dev/fd/2
stderr_logfile_maxbytes = 0
stdout_logfile = /dev/fd/1
stdout_logfile_maxbytes = 0
stopwaitsecs = 1
user = mayan
[program:mayan-worker-slow]
autorestart = false
autostart = true
command = nice -n 19 /bin/bash -c "${MAYAN_BIN} celery --settings=${MAYAN_SETTINGS_MODULE} worker -l ERROR -Q mailing,tools,statistics,parsing,ocr -n mayan-worker-slow.%%h ${MAYAN_WORKER_SLOW_CONCURRENCY}"
killasgroup = true
numprocs = 1
priority = 998
startsecs = 10
stderr_logfile = /dev/fd/2
stderr_logfile_maxbytes = 0
stdout_logfile = /dev/fd/1
stdout_logfile_maxbytes = 0
stopwaitsecs = 1
user = mayan
[program:mayan-celery-beat]
autorestart = false
autostart = true
command = nice -n 1 /bin/bash -c "${MAYAN_BIN} celery --settings=${MAYAN_SETTINGS_MODULE} beat --pidfile= -l ERROR"
killasgroup = true
numprocs = 1
priority = 998
stderr_logfile = /dev/fd/2
stderr_logfile_maxbytes = 0
stdout_logfile = /dev/fd/1
stdout_logfile_maxbytes = 0
startsecs = 10
stopwaitsecs = 1
user = mayan

32
docker/stack.yml Normal file
View File

@@ -0,0 +1,32 @@
version: '3.1'
volumes:
app:
driver: local
db:
driver: local
services:
db:
image: postgres
environment:
POSTGRES_DB: mayan
POSTGRES_PASSWORD: mayan-password
POSTGRES_USER: mayan
volumes:
- db:/var/lib/postgresql/data
app:
image: mayanedms/mayanedms:latest
ports:
- 80:8000
environment:
MAYAN_DATABASE_ENGINE: django.db.backends.postgresql
MAYAN_DATABASE_HOST: db
MAYAN_DATABASE_NAME: mayan
MAYAN_DATABASE_PASSWORD: mayan-password
MAYAN_DATABASE_USER: mayan
MAYAN_DATABASE_CONN_MAX_AGE: 60
volumes:
- app:/var/lib/mayan

1
docker/version Executable file
View File

@@ -0,0 +1 @@
3.1.9

Binary file not shown.

Before

Width:  |  Height:  |  Size: 628 KiB

After

Width:  |  Height:  |  Size: 6.6 MiB

View File

@@ -1,21 +1,23 @@
====================
********************
Access control lists
====================
********************
Besides the permissions system explained in :doc:`permissions`, Mayan EDMS
provides per object permission granting. This feature is used to grant a
permission to a role, but this permission can only be executed for a limited
number of objects (documents, folders, tags) instead of being effective
system-wide.
Besides the permissions system explained in :doc:`../chapters/permissions`,
Mayan EDMS provides per object permission granting. This feature is used to
grant a permission to a role, but this permission can only be executed for a
limited number of objects (documents, folders, tags) instead of being
effective system-wide.
.. blockdiag::
blockdiag {
default_shape = roundedbox
document [ label = 'Document' ];
role [ label = 'Role' ];
permission [ label = 'Permission' ];
role -> document <- permission;
role -> permission -> document;
}
Example:
@@ -23,11 +25,13 @@ Example:
.. blockdiag::
blockdiag {
default_shape = roundedbox
document [ label = '2015 Payroll report.txt', width=200 ];
role [ label = 'Accountants' ];
permission [ label = 'View document' ];
role -> document <- permission;
role -> permission -> document;
}
In this scenario only users in groups belonging to the ``Accountants`` role
@@ -36,18 +40,22 @@ would be able to view the ``2015 Payroll report.txt`` document.
Inherited access control
========================
It is also possible to grant a permission to a role for a specific document type (:doc:`document_types`).
Under this scheme all users in groups belonging to that role will inherit that
permission for all documents of that type.
It is also possible to grant a permission to a role for a specific document
type (:doc:`../chapters/document_types`). Under this scheme all users in
groups belonging to that role will inherit that permission for all documents
of that type.
.. blockdiag::
blockdiag {
default_shape = roundedbox
document_type [ label = 'Document type' ];
role [ label = 'Role' ];
permission [ label = 'Permission' ];
documents [shape = "note", stacked];
role -> document_type <- permission;
role -> permission -> document_type ;
document_type -> documents [folded, label = "inherit" ];
}
Example:
@@ -55,11 +63,14 @@ Example:
.. blockdiag::
blockdiag {
default_shape = roundedbox
document_type [ label = 'Payroll reports', width=200 ];
role [ label = 'Accountants' ];
permission [ label = 'View document' ];
documents [shape = "note", stacked, label="payroll_report*.pdf" ];
role -> document_type <- permission;
role -> permission -> document_type ;
document_type -> documents [folded, label = "inherit" ];
}
The role ``Accountants`` is given the permission ``document view`` for the

28
docs/chapters/api.rst Normal file
View File

@@ -0,0 +1,28 @@
***
API
***
Mayan EDMS provides an HTTP REST Application Program Interface (or API). This
API allows integration with 3rd party software using simple HTTP requests.
Several API authentication methods are provides: **Session**, **Token**,
and **HTTP Basic**.
The URL for the API can be found via the :menuselection:`Tools --> REST API
menu. The API is also self-documenting. The live API documentation can be
found in the :menuselection:`Tools --> API Documentation (Swagger)` menu for
the Swagger version and in the
:menuselection:`Tools --> API Documentation (ReDoc)` menu for the ReDoc version.
The are a few ways to structure REST APIs. In the case of Mayan EDMS, API
endpoints are structured by resource type. Examples:
* /cabinets - To view or create new cabinets
* /cabinets/<id> - To view the details, edit, or delete an existing cabinet.
* /cabinets/<id>/documents - To view, add, or remove documents from an existing
cabinet.
* /cabinets/<id>/documents/<id> - To view, add, or remove one document from an
existing cabinet.
The API supports the HTTP verbs: **GET**, **POST**, **PUT**, **PATCH**,
and **DELETE**.

View File

@@ -1,6 +1,6 @@
============
************
App creation
============
************
Mayan EDMS apps are essentially Django app with some extra code to register
navigation, permissions and other relationships.
@@ -136,8 +136,8 @@ Views
The module common.generics provides custom generic class based views to be used.
The basic views used to create, edit, view and delete objects in Mayan EDMS
are: SingleObjectCreateView, SingleObjectDetailView, SingleObjectEditView,
and SingleObjectListView
are: ``SingleObjectCreateView``, ``SingleObjectDetailView``,
``SingleObjectEditView``, and ``SingleObjectListView``.
These views handle aspects relating to view permissions, object permissions,
post action redirection and template context generation.

70
docs/chapters/backups.rst Normal file
View File

@@ -0,0 +1,70 @@
*******
Backups
*******
To backup your install of Mayan EDMS just copy the actual document files and
the database content. If you are using the default storage backend, the
document files should be found in the ``media`` folder of your installation.
To dump the content of your database manager refer to the documentation chapter
regarding database data "dumping".
Here is an example of how to perform a backup and a restore of a PostgreSQL
database.
To dump the database into an SQL text file::
pg_dump -h <host> -U <database user> -c <database name> -W > `date +%Y-%m-%d"_"%H-%M-%S`.sql
Example::
pg_dump -h 127.0.0.1 -U mayan -c mayan -W > `date +%Y-%m-%d"_"%H-%M-%S`.sql
To restore the database from the SQL text file::
psql -h <host> -U <database user> -d <database name> -W -f <sql dump file>
Example::
psql -h 127.0.0.1 -U mayan -d mayan -W -f 2018-06-07_18-10-56.sql
Here is an example of how to perform a backup and a restore of a PostgreSQL
Docker container using a compressed dump file. A dump file is not compatible or
can be used interchangeable with an SQL text file.
To backup a PostgreSQL Docker container::
docker exec <container name> pg_dump -U <database user> -Fc -c <database name> > `date +%Y-%m-%d"_"%H-%M-%S`.dump
Example::
docker exec mayan-edms-db pg_dump -U mayan -Fc -c mayan > `date +%Y-%m-%d"_"%H-%M-%S`.dump
This will produce a compressed dump file with the current date and time as the filename.
To restore a PostgreSQL Docker container::
docker exec -i <container name> pg_restore -U <database user> -d <database name> < <dump file>
Since it is not possible to drop a currently open PostgreSQL database, this
command must be used on a new and empty PostsgreSQL container.
Example::
docker run -d \
--name mayan-edms-pg-new \
--restart=always \
-p 5432:5432 \
-e POSTGRES_USER=mayan \
-e POSTGRES_DB=mayan \
-e POSTGRES_PASSWORD=mayanuserpass \
-v /docker-volumes/mayan-edms/postgres-new:/var/lib/postgresql/data \
-d postgres:9.5
docker exec -i mayan-edms-pg-new pg_restore -U mayan -d mayan < 2018-06-07_17-09-34.dump
More information at:
- PostgreSQL: https://www.postgresql.org/docs/current/static/backup.html
- MySQL: https://dev.mysql.com/doc/refman/5.7/en/mysqldump.html
- SQLite: Just copy the file ``mayan/media/db.sqlite3``

View File

@@ -0,0 +1,233 @@
**************************************************
Mayan EDMS Entity Contributor Assignment Agreement
**************************************************
Thank you for your interest in contributing to Mayan EDMS ("We" or "Us").
This contributor agreement ("Agreement") documents the rights granted by
contributors to Us. To make this document effective, please print it, sign it
(by copyright holder or authorized party) and send it to Us by email to
caa@mayan-edms.com. This is a legally binding document, so please read it
carefully before agreeing to it. The Agreement may cover more than one
software project managed by Us.
1. Definitions
==============
"You" means any Legal Entity on behalf of whom a Contribution has been received
by Us. "Legal Entity" means an entity which is not a natural person.
"Affiliates" means other Legal Entities that control, are controlled by, or
under common control with that Legal Entity. For the purposes of this
definition, "control" means (i) the power, direct or indirect, to cause the
direction or management of such Legal Entity, whether by contract or otherwise,
(ii) ownership of fifty percent (50%) or more of the outstanding shares or
securities which vote to elect the management or other persons who direct such
Legal Entity or (iii) beneficial ownership of such entity.
"Contribution" means any work of authorship that is Submitted by You to Us in
which You own or assert ownership of the Copyright. We cannot accept
contributions for which you do not own the Copyright or for which you don't
have the necessary legal power to transfer.
"Copyright" means all rights protecting works of authorship owned or controlled
by You or Your Affiliates, including copyright, moral and neighboring rights,
as appropriate, for the full term of their existence including any extensions
by You.
"Material" means the work of authorship which is made available by Us to third
parties. When this Agreement covers more than one software project, the
Material means the work of authorship to which the Contribution was Submitted.
After You Submit the Contribution, it may be included in the Material.
"Submit" means any form of electronic, verbal, or written communication sent
to Us or our representatives, including but not limited to electronic mailing
lists, source code control systems, and issue tracking systems that are managed
by, or on behalf of, Us for the purpose of discussing and improving the
Material, but excluding communication that is conspicuously marked or otherwise
designated in writing by You as "Not a Contribution."
"Submission Date" means the date on which You Submit a Contribution to Us.
"Effective Date" means the date You execute this Agreement or the date You
first Submit a Contribution to Us, whichever is earlier.
2. Grant of Rights
==================
2.1 Copyright Assignment
------------------------
a. At the time the Contribution is Submitted, You assign to Us all right, title,
and interest worldwide in all Copyright covering the Contribution; provided
that this transfer is conditioned upon compliance with Section 2.3.
b. To the extent that any of the rights in Section 2.1(a) cannot be assigned by
You to Us, You grant to Us a perpetual, worldwide, exclusive, royalty-free,
transferable, irrevocable license under such non-assigned rights, with rights
to sublicense through multiple tiers of sublicensees, to practice such
non-assigned rights, including, but not limited to, the right to reproduce,
modify, display, perform and distribute the Contribution; provided that this
license is conditioned upon compliance with Section 2.3.
c. To the extent that any of the rights in Section 2.1(a) can neither be
assigned nor licensed by You to Us, You irrevocably waive and agree never to
assert such rights against Us, any of our successors in interest, or any of
our licensees, either direct or indirect; provided that this agreement not
to assert is conditioned upon compliance with Section 2.3.
d. Upon such transfer of rights to Us, the Contribution will be licenses under
the terms of the Material.
2.2 Patent License
------------------
For patent claims including, without limitation, method, process, and apparatus
claims which You or Your Affiliates own, control or have the right to grant,
now or in the future, You grant to Us a perpetual, worldwide, non-exclusive,
transferable, royalty-free, irrevocable patent license, with the right to
sublicense these rights to multiple tiers of sublicensees, to make, have made,
use, sell, offer for sale, import and otherwise transfer the Contribution and
the Contribution in combination with the Material (and portions of such
combination). This license is granted only to the extent that the exercise of
the licensed rights infringes such patent claims; and provided that this license
is conditioned upon compliance with Section 2.3.
2.3 Outbound License
--------------------
As a condition on the grant of rights in Sections 2.1 and 2.2, We agree to
license the Contribution only under the terms of the license or licenses which
We are using on the Submission Date for the Material (including any rights to
adopt any future version of a license if permitted).
2.4 Moral Rights
----------------
If moral rights apply to the Contribution, to the maximum extent permitted by
law, You waive and agree not to assert such moral rights against Us or our
successors in interest, or any of our licensees, either direct or indirect.
2.5 Our Rights
--------------
You acknowledge that We are not obligated to use Your Contribution as part of
the Material and may decide to include any Contribution We consider appropriate.
2.6 Reservation of Rights
-------------------------
Any rights not expressly assigned or licensed under this section are expressly
reserved by You.
3. Agreement
============
You confirm that:
a. You have the legal authority to enter into this Agreement.
b. You or Your Affiliates own the Copyright and patent claims covering the
Contribution which are required to grant the rights under Section 2.
c. The grant of rights under Section 2 does not violate any grant of rights
which You or Your Affiliates have made to third parties.
4. Disclaimer
=============
EXCEPT FOR THE EXPRESS WARRANTIES IN SECTION 3, THE CONTRIBUTION IS PROVIDED
"AS IS". MORE PARTICULARLY, ALL EXPRESS OR IMPLIED WARRANTIES INCLUDING,
WITHOUT LIMITATION, ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE EXPRESSLY DISCLAIMED BY YOU TO US
AND BY US TO YOU. TO THE EXTENT THAT ANY SUCH WARRANTIES CANNOT BE DISCLAIMED,
SUCH WARRANTY IS LIMITED IN DURATION TO THE MINIMUM PERIOD PERMITTED BY LAW.
5. Consequential Damage Waiver
==============================
TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, IN NO EVENT WILL YOU OR US
BE LIABLE FOR ANY LOSS OF PROFITS, LOSS OF ANTICIPATED SAVINGS, LOSS OF DATA,
INDIRECT, SPECIAL, INCIDENTAL, CONSEQUENTIAL AND EXEMPLARY DAMAGES ARISING OUT
OF THIS AGREEMENT REGARDLESS OF THE LEGAL OR EQUITABLE THEORY (CONTRACT, TORT
OR OTHERWISE) UPON WHICH THE CLAIM IS BASED.
6. Miscellaneous
================
6.1 Jurisdiction
----------------
This Agreement will be governed by and construed in accordance with the laws of
Puerto Rico excluding its conflicts of law provisions. Under certain circumstances,
the governing law in this section might be superseded by the United Nations
Convention on Contracts for the International Sale of Goods ("UN Convention")
and the parties intend to avoid the application of the UN Convention to this
Agreement and, thus, exclude the application of the UN Convention in its
entirety to this Agreement.
6.2 Acceptance
--------------
This Agreement sets out the entire agreement between You and Us for Your
Contributions to Us and overrides all other agreements or understandings.
6.3 Third parties
-----------------
If You or We assign the rights or obligations received through this Agreement
to a third party, as a condition of the assignment, that third party must
agree in writing to abide by all the rights and obligations in the Agreement.
6.4 Unmet responsibilities
--------------------------
The failure of either party to require performance by the other party of any
provision of this Agreement in one situation shall not affect the right of a
party to require such performance at any time in the future. A waiver of
performance under a provision in one situation shall not be considered a
waiver of the performance of the provision in the future or a waiver of the
provision in its entirety.
6.5 Continuation
----------------
If any provision of this Agreement is found void and unenforceable, such
provision will be replaced to the extent possible with a provision that comes
closest to the meaning of the original provision and which is enforceable.
The terms and conditions set forth in this Agreement shall apply
notwithstanding any failure of essential purpose of this Agreement or any
limited remedy to the maximum extent possible under law.
::
Name: _________________________________________________
Email: ________________________________________________
Address: ______________________________________________
Address (cont): _______________________________________
Country: ______________________________________________
Phone number: _________________________________________
Fax number: ___________________________________________
_______________________________________________________
Signature
Mayan EDMS Entity CAA Version 1.0 April 8, 2018

View File

@@ -0,0 +1,234 @@
******************************************************
Mayan EDMS Individual Contributor Assignment Agreement
******************************************************
Thank you for your interest in contributing to Mayan EDMS ("We" or "Us").
This contributor agreement ("Agreement") documents the rights granted by
contributors to Us. To make this document effective, please print it, sign it
(by copyright holder or authorized party) and send it to Us by email to
caa@mayan-edms.com. This is a legally binding document, so please read it
carefully before agreeing to it. The Agreement may cover more than one
software project managed by Us.
1. Definitions
==============
"You" means the individual who Submits a Contribution to Us.
"Contribution" means any work of authorship that is Submitted by You to Us
in which You own or assert ownership of the Copyright. We cannot accept
contributions for which you do not own the Copyright or for which you don't
have the necessary legal power to transfer.
"Copyright" means all rights protecting works of authorship owned or
controlled by You, including copyright, moral and neighboring rights,
as appropriate, for the full term of their existence including any extensions
by You.
"Material" means the work of authorship which is made available by Us to third
parties. When this Agreement covers more than one software project, the Material
means the work of authorship to which the Contribution was Submitted. After
You Submit the Contribution, it may be included in the Material.
"Submit" means any form of electronic, verbal, or written communication
sent to Us or our representatives, including but not limited to
electronic mailing lists, source code control systems, and issue tracking systems
that are managed by, or on behalf of, Us for the purpose of discussing and
improving the Material, but excluding communication that is conspicuously marked
or otherwise designated in writing by You as "Not a Contribution."
"Submission Date" means the date on which You Submit a Contribution to Us.
"Effective Date" means the date You execute this Agreement or the date You first
Submit a Contribution to Us, whichever is earlier.
2. Grant of Rights
==================
2.1 Copyright Assignment
------------------------
a. At the time the Contribution is Submitted, You assign to Us all right,
title, and interest worldwide in all Copyright covering the Contribution;
provided that this transfer is conditioned upon compliance with Section 2.3.
b. To the extent that any of the rights in Section 2.1(a) cannot be assigned
by You to Us, You grant to Us a perpetual, worldwide, exclusive, royalty-free,
transferable, irrevocable license under such non-assigned rights, with rights
to sublicense through multiple tiers of sublicensees, to practice such
non-assigned rights, including, but not limited to, the right to reproduce,
modify, display, perform and distribute the Contribution; provided that
this license is conditioned upon compliance with Section 2.3.
c. To the extent that any of the rights in Section 2.1(a) can neither be
assigned nor licensed by You to Us, You irrevocably waive and agree never to
assert such rights against Us, any of our successors in interest, or any of
our licensees, either direct or indirect; provided that this agreement not
to assert is conditioned upon compliance with Section 2.3.
d. Upon such transfer of rights to Us, the Contribution will be licenses under
the terms of the Material.
2.2 Patent License
------------------
For patent claims including, without limitation, method, process, and apparatus
claims which You own, control or have the right to grant, now or in the future,
You grant to Us a perpetual, worldwide, non-exclusive, transferable, royalty-free,
irrevocable patent license, with the right to sublicense these rights to multiple
tiers of sublicensees, to make, have made, use, sell, offer for sale, import and
otherwise transfer the Contribution and the Contribution in combination with
the Material (and portions of such combination). This license is granted only
to the extent that the exercise of the licensed rights infringes such patent claims;
and provided that this license is conditioned upon compliance with Section 2.3.
2.3 Outbound License
--------------------
As a condition on the grant of rights in Sections 2.1 and 2.2, We agree to
license the Contribution only under the terms of the license or licenses which
We are using on the Submission Date for the Material (including any rights to
adopt any future version of a license if permitted).
2.4 Moral Rights
----------------
If moral rights apply to the Contribution, to the maximum extent permitted by law,
You waive and agree not to assert such moral rights against Us or our successors
in interest, or any of our licensees, either direct or indirect.
2.5 Our Rights
--------------
You acknowledge that We are not obligated to use Your Contribution as part of
the Material and may decide to include any Contribution We consider appropriate.
2.6 Reservation of Rights
-------------------------
Any rights not expressly assigned or licensed under this section are expressly
reserved by You.
3. Agreement
============
You confirm that:
a. You have the legal authority to enter into this Agreement.
b. You own the Copyright and patent claims covering the Contribution which are
required to grant the rights under Section 2.
c. The grant of rights under Section 2 does not violate any grant of rights
which You have made to third parties, including Your employer. If You are an
employee, You have had Your employer approve this Agreement or sign the Entity
version of this document. If You are less than eighteen years old, please have
Your parents or guardian sign the Agreement.
4. Disclaimer
=============
EXCEPT FOR THE EXPRESS WARRANTIES IN SECTION 3, THE CONTRIBUTION IS PROVIDED
"AS IS". MORE PARTICULARLY, ALL EXPRESS OR IMPLIED WARRANTIES INCLUDING, WITHOUT
LIMITATION, ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
PURPOSE AND NON-INFRINGEMENT ARE EXPRESSLY DISCLAIMED BY YOU TO US AND BY US
TO YOU. TO THE EXTENT THAT ANY SUCH WARRANTIES CANNOT BE DISCLAIMED, SUCH
WARRANTY IS LIMITED IN DURATION TO THE MINIMUM PERIOD PERMITTED BY LAW.
5. Consequential Damage Waiver
==============================
TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, IN NO EVENT WILL YOU OR US
BE LIABLE FOR ANY LOSS OF PROFITS, LOSS OF ANTICIPATED SAVINGS, LOSS OF DATA,
INDIRECT, SPECIAL, INCIDENTAL, CONSEQUENTIAL AND EXEMPLARY DAMAGES ARISING OUT
OF THIS AGREEMENT REGARDLESS OF THE LEGAL OR EQUITABLE THEORY (CONTRACT, TORT
OR OTHERWISE) UPON WHICH THE CLAIM IS BASED.
6. Miscellaneous
================
6.1 Jurisdiction
----------------
This Agreement will be governed by and construed in accordance with the laws of
Puerto Rico excluding its conflicts of law provisions. Under certain circumstances,
the governing law in this section might be superseded by the United Nations
Convention on Contracts for the International Sale of Goods ("UN Convention")
and the parties intend to avoid the application of the UN Convention to this
Agreement and, thus, exclude the application of the UN Convention in its
entirety to this Agreement.
6.2 Acceptance
--------------
This Agreement sets out the entire agreement between You and Us for Your
Contributions to Us and overrides all other agreements or understandings.
6.3 Third parties
-----------------
If You or We assign the rights or obligations received through this Agreement
to a third party, as a condition of the assignment, that third party must
agree in writing to abide by all the rights and obligations in the Agreement.
6.4 Unmet responsibilities
--------------------------
The failure of either party to require performance by the other party of any
provision of this Agreement in one situation shall not affect the right of a
party to require such performance at any time in the future. A waiver of
performance under a provision in one situation shall not be considered a
waiver of the performance of the provision in the future or a waiver of the
provision in its entirety.
6.5 Continuation
----------------
If any provision of this Agreement is found void and unenforceable,
such provision will be replaced to the extent possible with a provision that
comes closest to the meaning of the original provision and which is enforceable.
The terms and conditions set forth in this Agreement shall apply notwithstanding
any failure of essential purpose of this Agreement or any limited remedy to
the maximum extent possible under law.
::
Name: _________________________________________________
Email: ________________________________________________
Address: ______________________________________________
Address (cont): _______________________________________
Country: ______________________________________________
Phone number: _________________________________________
Fax number: ___________________________________________
_______________________________________________________
Signature
Mayan EDMS Individual CAA Version 1.0 April 8, 2018

View File

@@ -0,0 +1,14 @@
Cabinets
========
Cabinets are a multi-level method to organize documents. Each cabinet can
contain documents as well as other sub level cabinets. Cabinets can
be added from the :menuselection:`Cabinets --> Add new` menu.
With a cabinet structure created, the next step is to add documents to them.
To add documents to a cabinet, select the cabinet tab of a document, and
select :menuselection:`Actions --> Add to cabinets` link.
Documents can also be added in bulk to one or more cabinets from any view
that lists documents.

View File

@@ -1,6 +1,6 @@
=========
*********
Checkouts
=========
*********
Checkouts are a way to block certain accesses or actions of a document for a
period of time.

View File

@@ -0,0 +1,103 @@
*******************
Database conversion
*******************
Version 3.1.x added a new management command to help convert data residing in
an SQLite database to other database managers like PostgreSQL. Here is the
conversion procedure.
Direct install
==============
* Make a backup of your existing SQLite database and documents by copying the
``/opt/mayan-edms/media`` folder.
* :doc:`Upgrade to at least version 3.1.3. <../releases/3.1.3>`
* Migrate the existing SQLite database with the command ``performupgrade``::
sudo -u mayan MAYAN_MEDIA_ROOT=/opt/mayan-edms/media /opt/mayan-edms/bin/mayan-edms.py performupgrade
* Install PostgreSQL::
sudo apt-get install postgresql libpq-dev
* Provision a PostgreSQL database::
sudo -u postgres psql -c "CREATE USER mayan WITH password 'mayanuserpass';"
sudo -u postgres createdb -O mayan mayan
* Install the Python client for PostgreSQL::
sudo -u mayan /opt/mayan-edms/bin/pip install --no-cache-dir psycopg2==2.7.3.2
* Copy the newly created fallback config file::
cp /opt/mayan-edms/media/config_backup.yml /opt/mayan-edms/media/config.yml
* Edit the configuration file to add the entry for the PostgreSQL database and
rename the SQLite database to 'old'::
# Before
DATABASES:
default:
ATOMIC_REQUESTS: false
AUTOCOMMIT: true
CONN_MAX_AGE: 0
ENGINE: django.db.backends.sqlite3
HOST: ''
NAME: /opt/mayan-edms/media/db.sqlite3
OPTIONS: {}
PASSWORD: ''
PORT: ''
TEST: {CHARSET: null, COLLATION: null, MIRROR: null, NAME: null}
TIME_ZONE: null
USER: ''
# After
DATABASES:
old:
ATOMIC_REQUESTS: false
AUTOCOMMIT: true
CONN_MAX_AGE: 0
ENGINE: django.db.backends.sqlite3
HOST: ''
NAME: /opt/mayan-edms/media/db.sqlite3
OPTIONS: {}
PASSWORD: ''
PORT: ''
TEST: {CHARSET: null, COLLATION: null, MIRROR: null, NAME: null}
TIME_ZONE: null
USER: ''
default:
ATOMIC_REQUESTS: false
AUTOCOMMIT: true
CONN_MAX_AGE: 0
ENGINE: django.db.backends.postgresql
HOST: '127.0.0.1'
NAME: /opt/mayan-edms/media/db.sqlite3
OPTIONS: {}
PASSWORD: 'mayanuserpass'
PORT: ''
TEST: {CHARSET: null, COLLATION: null, MIRROR: null, NAME: null}
TIME_ZONE: null
USER: 'mayan'
* Migrate the new database to create the empty tables::
sudo -u mayan MAYAN_DATABASE_ENGINE=django.db.backends.postgresql MAYAN_DATABASE_NAME=mayan MAYAN_DATABASE_PASSWORD=mayanuserpass MAYAN_DATABASE_USER=mayan MAYAN_DATABASE_HOST=127.0.0.1 MAYAN_MEDIA_ROOT=/opt/mayan-edms/media /opt/mayan-edms/bin/mayan-edms.py migrate
* Convert the data in the SQLite and store it in the PostgreSQL database::
sudo -u mayan MAYAN_DATABASE_ENGINE=django.db.backends.postgresql MAYAN_DATABASE_NAME=mayan MAYAN_DATABASE_PASSWORD=mayanuserpass MAYAN_DATABASE_USER=mayan MAYAN_DATABASE_HOST=127.0.0.1 MAYAN_MEDIA_ROOT=/opt/mayan-edms/media /opt/mayan-edms/bin/mayan-edms.py convertdb --from=old --to=default --force
* Update the supervisor config file to have Mayan EDMS run from the PostgreSQL database::
[supervisord]
environment=
<...>
MAYAN_DATABASE_ENGINE=django.db.backends.postgresql,
MAYAN_DATABASE_HOST=127.0.0.1,
MAYAN_DATABASE_NAME=mayan,
MAYAN_DATABASE_PASSWORD=mayanuserpass,
MAYAN_DATABASE_USER=mayan,
MAYAN_DATABASE_CONN_MAX_AGE=360,
<...>

375
docs/chapters/deploying.rst Normal file
View File

@@ -0,0 +1,375 @@
******************
Direct deployments
******************
Mayan EDMS should be deployed like any other Django_ project and
preferably using virtualenv_. Below are some ways to deploy and use Mayan EDMS.
Do not use more than one method.
Being a Django_ and a Python_ project, familiarity with these technologies is
recommended to better understand why Mayan EDMS does some of the things it
does.
Basic deployment
================
This setup uses less memory and CPU resources at the expense of some speed.
Binary dependencies
-------------------
If using a Debian_ or Ubuntu_ based Linux distribution, get the executable
requirements using::
sudo apt-get install exiftool g++ gcc ghostscript gnupg1 graphviz \
libfuse2 libjpeg-dev libmagic1 libpq-dev libpng-dev libreoffice \
libtiff-dev poppler-utils postgresql python-dev python-virtualenv \
redis-server sane-utils supervisor tesseract-ocr zlib1g-dev -y
Create an user account for the installation:
--------------------------------------------
::
sudo adduser mayan --disabled-password --disabled-login --no-create-home --gecos ""
Create the parent directory where the project will be deployed:
---------------------------------------------------------------
::
sudo mkdir /opt
Create the Python virtual environment for the installation:
-----------------------------------------------------------
::
sudo virtualenv /opt/mayan-edms
Make the mayan user the owner of the installation directory:
------------------------------------------------------------
::
sudo chown mayan:mayan /opt/mayan-edms -R
Install Mayan EDMS from PyPI:
-----------------------------
::
sudo -u mayan /opt/mayan-edms/bin/pip install --no-cache-dir mayan-edms
Install the Python client for PostgreSQL and Redis:
---------------------------------------------------
::
sudo -u mayan /opt/mayan-edms/bin/pip install --no-cache-dir psycopg2==2.7.3.2 redis==2.10.6
Create the database for the installation:
-----------------------------------------
::
sudo -u postgres psql -c "CREATE USER mayan WITH password 'mayanuserpass';"
sudo -u postgres createdb -O mayan mayan
Initialize the project:
-----------------------
::
sudo -u mayan MAYAN_DATABASES='{default: {ENGINE: django.db.backends.postgresql, NAME: mayan, PASSWORD: mayanuserpass, USER: mayan, HOST=127.0.0.1}}' \
MAYAN_MEDIA_ROOT=/opt/mayan-edms/media \
/opt/mayan-edms/bin/mayan-edms.py initialsetup
Collect the static files:
-------------------------
::
sudo -u mayan MAYAN_MEDIA_ROOT=/opt/mayan-edms/media \
/opt/mayan-edms/bin/mayan-edms.py preparestatic --noinput
Create the supervisor file at ``/etc/supervisor/conf.d/mayan.conf``:
--------------------------------------------------------------------
::
[supervisord]
environment=
MAYAN_ALLOWED_HOSTS='["*"]', # Allow access to other network hosts other than localhost
MAYAN_CELERY_BROKER_URL="redis://127.0.0.1:6379/0",
MAYAN_CELERY_RESULT_BACKEND="redis://127.0.0.1:6379/0",
PYTHONPATH=/opt/mayan-edms/lib/python2.7/site-packages:/opt/mayan-edms/data,
MAYAN_MEDIA_ROOT=/opt/mayan-edms/media,
MAYAN_DATABASES='{default: {ENGINE: django.db.backends.postgresql, HOST: 127.0.0.1, NAME: mayan, PASSWORD: mayanuserpass, USER: mayan, CONN_MAX_AGE: 60}}',
DJANGO_SETTINGS_MODULE=mayan.settings.production
[program:mayan-gunicorn]
autorestart = true
autostart = true
command = /opt/mayan-edms/bin/gunicorn -w 2 mayan.wsgi --max-requests 500 --max-requests-jitter 50 --worker-class gevent --bind 0.0.0.0:8000 --timeout 120
user = mayan
[program:mayan-worker-fast]
autorestart = true
autostart = true
command = nice -n 1 /opt/mayan-edms/bin/mayan-edms.py celery worker -l ERROR -Q converter,document_states_fast,sources_fast -n mayan-worker-fast.%%h --concurrency=1
killasgroup = true
numprocs = 1
priority = 998
startsecs = 10
stopwaitsecs = 1
user = mayan
[program:mayan-worker-medium]
autorestart = true
autostart = true
command = nice -n 18 /opt/mayan-edms/bin/mayan-edms.py celery worker -l ERROR -Q checkouts_periodic,documents_periodic,indexing,metadata,sources,sources_periodic,uploads,documents -n mayan-worker-medium.%%h --concurrency=1
killasgroup = true
numprocs = 1
priority = 998
startsecs = 10
stopwaitsecs = 1
user = mayan
[program:mayan-worker-slow]
autorestart = true
autostart = true
command = nice -n 19 /opt/mayan-edms/bin/mayan-edms.py celery worker -l ERROR -Q mailing,tools,statistics,parsing,ocr -n mayan-worker-slow.%%h --concurrency=1
killasgroup = true
numprocs = 1
priority = 998
startsecs = 10
stopwaitsecs = 1
user = mayan
[program:mayan-celery-beat]
autorestart = true
autostart = true
command = nice -n 1 /opt/mayan-edms/bin/mayan-edms.py celery beat --pidfile= -l ERROR
killasgroup = true
numprocs = 1
priority = 998
startsecs = 10
stopwaitsecs = 1
user = mayan
Configure Redis to discard data when it runs out of memory, not save its database and only keep 1 database:
-----------------------------------------------------------------------------------------------------------
::
echo "maxmemory-policy allkeys-lru" >> /etc/redis/redis.conf
echo "save \"\"" >> /etc/redis/redis.conf
echo "databases 1" >> /etc/redis/redis.conf
systemctl restart redis
Enable and restart the services [1_]:
-------------------------------------
::
systemctl enable supervisor
systemctl restart supervisor
.. _deployment_advanced:
Advanced deployment
===================
This variation uses RabbitMQ as the message broker and removes the fast worker
concurrency restriction. RabbitMQ consumes more memory but scales to thousands
of messages. RabbitMQ messages are also persistent, this means that pending
tasks are not lost in the case of a restart. The database connection lifetime
is increased to 10 minutes. The Gunicorn workers are increased to 3.
Binary dependencies
-------------------
If using a Debian_ or Ubuntu_ based Linux distribution, get the executable
requirements using::
sudo apt-get install exiftool g++ gcc ghostscript gnupg1 graphviz \
libfuse2 libjpeg-dev libmagic1 libpq-dev libpng-dev libreoffice \
libtiff-dev poppler-utils postgresql python-dev python-virtualenv \
rabbitmq-server redis-server sane-utils supervisor tesseract-ocr \
zlib1g-dev -y
Create an user account for the installation:
--------------------------------------------
::
sudo adduser mayan --disabled-password --disabled-login --no-create-home --gecos ""
Create the parent directory where the project will be deployed:
---------------------------------------------------------------
::
sudo mkdir /opt
Create the Python virtual environment for the installation:
-----------------------------------------------------------
::
sudo virtualenv /opt/mayan-edms
Make the mayan user the owner of the installation directory:
------------------------------------------------------------
::
sudo chown mayan:mayan /opt/mayan-edms -R
Install Mayan EDMS from PyPI:
-----------------------------
::
sudo -u mayan /opt/mayan-edms/bin/pip install --no-cache-dir mayan-edms
Install the Python client for PostgreSQL and Redis:
---------------------------------------------------
::
sudo -u mayan /opt/mayan-edms/bin/pip install --no-cache-dir librabbitmq==2.0.0 psycopg2==2.7.3.2 redis==2.10.6
Create the database for the installation:
-----------------------------------------
::
sudo -u postgres psql -c "CREATE USER mayan WITH password 'mayanuserpass';"
sudo -u postgres createdb -O mayan mayan
Initialize the project:
-----------------------
::
sudo -u mayan MAYAN_DATABASES='{default: {ENGINE: django.db.backends.postgresql, NAME: mayan, PASSWORD: mayanuserpass, USER: mayan, HOST=127.0.0.1}}' \
MAYAN_MEDIA_ROOT=/opt/mayan-edms/media \
/opt/mayan-edms/bin/mayan-edms.py initialsetup
Collect the static files:
-------------------------
::
sudo -u mayan MAYAN_MEDIA_ROOT=/opt/mayan-edms/media \
/opt/mayan-edms/bin/mayan-edms.py preparestatic --noinput
Create the RabbitMQ user and vhost:
-----------------------------------
::
sudo rabbitmqctl add_user mayan mayanrabbitmqpassword
sudo rabbitmqctl add_vhost mayan
sudo rabbitmqctl set_permissions -p mayan mayan ".*" ".*" ".*"
Create the supervisor file at ``/etc/supervisor/conf.d/mayan.conf``:
--------------------------------------------------------------------
::
[supervisord]
environment=
MAYAN_ALLOWED_HOSTS='["*"]', # Allow access to other network hosts other than localhost
MAYAN_CELERY_BROKER_URL="amqp://mayan:mayanrabbitmqpassword@localhost:5672/mayan",
MAYAN_CELERY_RESULT_BACKEND="redis://127.0.0.1:6379/0",
PYTHONPATH=/opt/mayan-edms/lib/python2.7/site-packages:/opt/mayan-edms/data,
MAYAN_MEDIA_ROOT=/opt/mayan-edms/media,
MAYAN_DATABASES='{default: {ENGINE: django.db.backends.postgresql, HOST: 127.0.0.1, NAME: mayan, PASSWORD: mayanuserpass, USER: mayan, CONN_MAX_AGE: 60}}',
DJANGO_SETTINGS_MODULE=mayan.settings.production
[program:mayan-gunicorn]
autorestart = true
autostart = true
command = /opt/mayan-edms/bin/gunicorn -w 3 mayan.wsgi --max-requests 500 --max-requests-jitter 50 --worker-class gevent --bind 0.0.0.0:8000 --timeout 120
user = mayan
[program:mayan-worker-fast]
autorestart = true
autostart = true
command = nice -n 1 /opt/mayan-edms/bin/mayan-edms.py celery worker -l ERROR -Q converter,document_states_fast,sources_fast -n mayan-worker-fast.%%h
killasgroup = true
numprocs = 1
priority = 998
startsecs = 10
stopwaitsecs = 1
user = mayan
[program:mayan-worker-medium]
autorestart = true
autostart = true
command = nice -n 18 /opt/mayan-edms/bin/mayan-edms.py celery worker -l ERROR -Q checkouts_periodic,documents_periodic,indexing,metadata,sources,sources_periodic,uploads,documents -n mayan-worker-medium.%%h --concurrency=1
killasgroup = true
numprocs = 1
priority = 998
startsecs = 10
stopwaitsecs = 1
user = mayan
[program:mayan-worker-slow]
autorestart = true
autostart = true
command = nice -n 19 /opt/mayan-edms/bin/mayan-edms.py celery worker -l ERROR -Q mailing,tools,statistics,parsing,ocr -n mayan-worker-slow.%%h --concurrency=1
killasgroup = true
numprocs = 1
priority = 998
startsecs = 10
stopwaitsecs = 1
user = mayan
[program:mayan-celery-beat]
autorestart = true
autostart = true
command = nice -n 1 /opt/mayan-edms/bin/mayan-edms.py celery beat --pidfile= -l ERROR
killasgroup = true
numprocs = 1
priority = 998
startsecs = 10
stopwaitsecs = 1
user = mayan
Configure Redis to discard data when it runs out of memory, not save its database and only keep 1 database:
-----------------------------------------------------------------------------------------------------------
::
echo "maxmemory-policy allkeys-lru" >> /etc/redis/redis.conf
echo "save \"\"" >> /etc/redis/redis.conf
echo "databases 1" >> /etc/redis/redis.conf
systemctl restart redis
Enable and restart the services [1_]:
-------------------------------------
::
systemctl enable supervisor
systemctl restart supervisor
Troubleshooting
===============
- Due to OS differences some binaries might reside in different locations.
Use environment variables or the configuration file to tell Mayan EDMS where
to file these binaries.
Example: OpenBSD. Add the following entries to supervisor configuration files.
::
MAYAN_DOCUMENT_PARSING_PDFTOTEXT_PATH=/usr/local/bin/pdftotext,
MAYAN_SIGNATURES_GPG_PATH=/usr/local/bin/gpg,
MAYAN_SOURCES_SCANIMAGE_PATH: /usr/local/bin/scanimage,
Alternatively a symlink from the actual binary location to where Mayan
EDMS is expecting them to be found by default also works for some users::
ln -s /usr/local/bin/gpg /usr/bin/gpg1
Example 2: Ubuntu 16.04. Add the following entries to supervisor
configuration files.
::
MAYAN_SIGNATURES_GPG_PATH=/usr/bin/gpg1,
Or add a symlink::
ln -s /usr/bin/gpg /usr/bin/gpg1
[1]: https://bugs.launchpad.net/ubuntu/+source/supervisor/+bug/1594740
.. _Debian: https://www.debian.org/
.. _Django: https://www.djangoproject.com/
.. _Python: https://www.python.org/
.. _SQLite: https://www.sqlite.org/
.. _Ubuntu: http://www.ubuntu.com/
.. _virtualenv: http://www.virtualenv.org/en/latest/index.html
.. _1: https://bugs.launchpad.net/ubuntu/+source/supervisor/+bug/1594740

File diff suppressed because it is too large Load Diff

291
docs/chapters/docker.rst Normal file
View File

@@ -0,0 +1,291 @@
************
Docker image
************
Stopping and starting the container
===================================
To stop the container use::
docker stop mayan-edms
To start the container again::
docker start mayan-edms
.. _docker_environment_variables:
Environment Variables
=====================
In addition to the all the environment variables supported by Mayan EDMS, the
Mayan EDMS image provides some additional variables to configure the Docker
specifics of the image.
``MAYAN_DATABASE_ENGINE``
Defaults to ``None``. This environment variable configures the database
backend to use. If left unset, SQLite will be used. The database backends
supported by this Docker image are:
- ``'django.db.backends.postgresql'``
- ``'django.db.backends.mysql'``
- ``'django.db.backends.sqlite3'``
When using the SQLite backend, the database file will be saved in the Docker
volume. The SQLite database as used by Mayan EDMS is meant only for development
or testing, never use it in production.
``MAYAN_DATABASE_HOST``
Defaults to `None`. This optional environment variable is used to set the
hostname that will be used to connect to the database. This can be the
hostname of another container or an IP address. For more information read
the pertinent Django documentation page:
:django-docs:`Settings, HOST <ref/settings/#host>`
``MAYAN_DATABASE_PORT``
Defaults to `None`. This optional environment variable is used to set the
port number to use when connecting to the database. An empty string means
the default port. Not used with SQLite. For more information read the
pertinent Django documentation page:
:django-docs:`Settings, PORT <ref/settings/#port>`
``MAYAN_CELERY_BROKER_URL``
This optional environment variable determines the broker that Celery will use
to relay task messages between the frontend code and the background workers.
For more information read the pertinent Celery Kombu documentation page: `Broker URL`_
.. _Broker URL: http://kombu.readthedocs.io/en/latest/userguide/connections.html#connection-urls
This Docker image supports using Redis and RabbitMQ as brokers.
Caveat: If the `MAYAN_CELERY_BROKER_URL` and `MAYAN_CELERY_RESULT_BACKEND` environment
variables are specified, the built-in Redis server inside the container will
be disabled.
``MAYAN_CELERY_RESULT_BACKEND``
This optional environment variable determines the results backend that Celery
will use to relay result messages from the background workers to the frontend
code. For more information read the pertinent Celery Kombu documentation page:
`Task result backend settings`_
.. _Task result backend settings: http://docs.celeryproject.org/en/3.1/configuration.html#celery-result-backend
This Docker image supports using Redis and RabbitMQ as result backends.
Caveat: If the `MAYAN_CELERY_BROKER_URL` and `MAYAN_CELERY_RESULT_BACKEND` environment
variables are specified, the built-in Redis server inside the container will
be disabled.
``MAYAN_SETTINGS_MODULE``
Optional. Allows loading an alternate settings file.
``MAYAN_GUNICORN_WORKERS``
Optional. This environment variable controls the number of frontend workers
that will be executed. If not specified the default is 2. For heavier loads,
user a higher number. A formula recommended for this setting is the number
of CPU cores + 1.
``MAYAN_WORKER_FAST_CONCURRENCY``
Optional. Changes the concurrency (number of child processes) of the Celery
worker consuming the queues in the fast (low latency, short tasks) category.
Default is 1. Use 0 to disable hardcoded concurrency and allow the Celery
worker to launch its default number of child processes (equal to the number
of CPUs detected).
``MAYAN_WORKER_MEDIUM_CONCURRENCY``
Optional. Changes the concurrency (number of child processes) of the Celery
worker consuming the queues in the medium (medium latency, long running tasks)
category. Default is 1. Use 0 to disable hardcoded concurrency and allow the
Celery worker to launch its default number of child processes (equal to the
number of CPUs detected).
``MAYAN_WORKER_SLOW_CONCURRENCY``
Optional. Changes the concurrency (number of child processes) of the Celery
worker consuming the queues in the slow (high latency, very long running tasks)
category. Default is 1. Use 0 to disable hardcoded concurrency and allow the
Celery worker to launch its default number of child processes (equal to the
number of CPUs detected).
Accessing outside data
======================
To use Mayan EDMS's staging folders or watch folders from Docker, the data
for these source must be made accessible to the container. This is done by
mounting the folders in the host computer to folders inside the container.
This is necessary because Docker containers do not have access to host data
on purpose. For example, to make a folder in the host accessible as a watch
folder, add the following to the Docker command line when starting the
container::
-v /opt/scanned_files:/srv/watch_folder
The command line would look like this::
docker run ... -v /opt/scanned_files:/srv/watch_folder mayanedms/mayanedms:latest
Now create a watch folder in Mayan EDMS using the path ``/srv/watch_folder``
and the documents from the host folder ``/opt/scanned_files`` will be
automatically available. Use the same procedure to mount host folders to be
used as staging folderes. In this example ``/srv/watch_folder`` was as the
container directory, but any path can be used as long as it is not an
already existing path or a path used by any other program.
Performing backups
==================
To backup the existing data, stop the image and copy the content of the volume.
For the example::
docker run -d --name mayan-edms --restart=always -p 80:8000 \
-v /docker-volumes/mayan:/var/lib/mayan \
-v /opt/scanned_files:/srv/watch_folder mayanedms/mayanedms:latest
That would be the ``/docker-volumes/mayan folder``::
sudo tar -zcvf backup.tar.gz /docker-volumes/mayan
sudo chown `whoami` backup.tar.gz
If using an external PostgreSQL or MySQL database or database containers, these
too need to be backed up using their respective procedures. A simple solution
is to copy the entire database container volume after the container has
been stopped.
Restoring from a backup
=======================
Uncompress the backup archive in the original docker volume using::
sudo tar -xvzf backup.tar.gz -C /
Upgrading
=========
Upgrading a Mayan EDMS Docker container is actually a matter of stopping and
deleting the container, downloading the most recent version of the image and
starting a container again. The container will take care of updating the
database structure to the newest version if necessary.
**IMPORTANT!** Do not delete the volume storing the data, only the container.
Stop the container to be upgraded::
docker stop mayan-edms
Remove the container::
docker rm mayan-edms
Pull the new image version::
docker pull mayanedms/mayanedms:latest
Start the container again with the new image version::
docker run -d --name mayan-edms --restart=always -p 80:8000 -v /docker-volumes/mayan:/var/lib/mayan mayanedms/mayanedms:latest
Building the image
==================
Clone the repository with::
git clone https://gitlab.com/mayan-edms/mayan-edms.git
Change to the directory of the cloned repository::
cd mayan-edms
Execute Docker's build command using the provided makefile::
make docker-build
Or using an apt cacher to speed up the build::
make docker-build-with-proxy APT_PROXY=172.17.0.1:3142
Replace the IP address `172.17.0.1` with the IP address of the computer
running the APT proxy and caching service.
Customizing the image
=====================
Simple method
-------------
If you just need to add a few Ubuntu or Python packages to your installation,
you can use the following environment variables:
``MAYAN_APT_INSTALLS``
Specifies a list of Ubuntu .deb packages to be installed via APT when the
container is first created. The installed packages are not lost when the image
is stopped. Example: To install the Tesseract OCR language packs for German
and Spanish add the following in your ``docker start`` command line::
-e MAYAN_APT_INSTALLS="tesseract-ocr-deu tesseract-ocr-spa"
``MAYAN_PIP_INSTALLS``
Specifies a list of Python packages to be installed via ``pip``. Packages will
be downloaded from the Python Package Index (https://pypi.python.org) by
default.
Using Docker compose
====================
To deploy a complete production stack using the included Docker compose file
execute::
docker-compose -f docker-compose.yml up -d
This Docker compose file will provision four containers:
- Postgres as the database
- Redis as the Celery result storage
- RabbitMQ as the Celery broker
- Mayan EDMS using the above service containers
To stop the stack use::
docker-compose -f docker-compose.yml stop
The stack will also create four volumes to store the data of each container.
These are:
- mayan_app - The Mayan EDMS data container, normally called `mayan_data` when not using Docker compose.
- mayan_broker - The broker volume, in this case RabbitMQ.
- mayan_db - The database volume, in this case Postgres.
- mayan_results - The celery result backend volume, in this case Redis.
Nightly images
==============
The continuous integration pipeline used for testing development builds also
produces a resulting Docker image. These are build automatically and their
stability is not guaranteed. They should never be used in production.
If you want to try out the Docker images the development uses or want a sneak
peek at the new features being worked on checkout the container registry at:
https://gitlab.com/mayan-edms/mayan-edms/container_registry

View File

@@ -0,0 +1,109 @@
*******************
Docker installation
*******************
Docker is a system that allows running programs in isolated areas which
have restricted access to resources, devices, and memory. Docker usage also
distributing software as a single file.
Make sure Docker is properly installed and working before attempting to install
Mayan EDMS.
Docker can be installed using their automated script::
wget -qO- https://get.docker.com/ | sh
This installs the latest versions of Docker. If you don't want run an automated
script follow the instructions outlined in their documentation:
https://docs.docker.com/install/
With Docker properly installed, proceed to download the Mayan EDMS image using the command::
docker pull mayanedms/mayanedms:<version>
Then download version 9.5 of the Docker PostgreSQL image::
docker pull postgres:9.5
Create and run a PostgreSQL container::
docker run -d \
--name mayan-edms-postgres \
--restart=always \
-p 5432:5432 \
-e POSTGRES_USER=mayan \
-e POSTGRES_DB=mayan \
-e POSTGRES_PASSWORD=mayanuserpass \
-v /docker-volumes/mayan-edms/postgres:/var/lib/postgresql/data \
-d postgres:9.5
The PostgreSQL container will have one database named ``mayan``, with an user
named ``mayan`` too, with a password of ``mayanuserpass``. The container will
expose its internal 5432 port (PostgreSQL's default port) via the host's
5432 port. The data of this container will reside on the host's
``/docker-volumes/mayan-edms/postgres`` folder.
Finally create and run a Mayan EDMS container. Change <version> with the
latest version in numeric form (example: 2.7.3) or use the ``latest``
identifier::
docker run -d \
--name mayan-edms \
--restart=always \
-p 80:8000 \
-e MAYAN_DATABASES='{default: {ENGINE: django.db.backends.postgresql, HOST: 172.17.0.1, NAME: mayan, PASSWORD: mayanuserpass, USER: mayan, CONN_MAX_AGE: 60}}' \
-v /docker-volumes/mayan-edms/media:/var/lib/mayan \
mayanedms/mayanedms:<version>
The Mayan EDMS container will connect to the PostgreSQL container via the
``172.17.0.1`` IP address (the Docker host's default IP address). It will
connect using the ``django.db.backends.postgresql`` database driver and
connect to the ``mayan`` database using the ``mayan`` user with the password
``mayanuserpass``. The container will keep connections to the database
for up to 60 seconds in an attempt to reuse them increasing response time
and reducing memory usage. The files of the container will be store in the
host's ``/docker-volumes/mayan-edms/media`` folder. The container will
expose its web service running on port 8000 on the host's port 80.
The container will be available by browsing to ``http://localhost`` or to
the IP address of the computer running the container.
If another web server is running on port 80 use a different port in the
``-p`` option. For example: ``-p 81:8000``.
Using a dedicated Docker network
================================
Use this method to avoid having to expose PostreSQL port to the host's network
or if you have other PostgreSQL instances but still want to use the default
port of 5432 for this installation.
Create the network::
docker network create mayan
Launch the PostgreSQL container with the network option and remove the port
binding (``-p 5432:5432``)::
docker run -d \
--name mayan-edms-postgres \
--network=mayan \
--restart=always \
-e POSTGRES_USER=mayan \
-e POSTGRES_DB=mayan \
-e POSTGRES_PASSWORD=mayanuserpass \
-v /docker-volumes/mayan-edms/postgres:/var/lib/postgresql/data \
-d postgres:9.5
Launch the Mayan EDMS container with the network option and change the
database hostname to the PostgreSQL container name (``mayan-edms-postgres``)
instead of the IP address of the Docker host (``172.17.0.1``)::
docker run -d \
--name mayan-edms \
--network=mayan \
--restart=always \
-p 80:8000 \
-e MAYAN_DATABASES='{default: {ENGINE: django.db.backends.postgresql, HOST: mayan-edms-postgres, NAME: mayan, PASSWORD: mayanuserpass, USER: mayan, CONN_MAX_AGE: 60}}' \
-v /docker-volumes/mayan-edms/media:/var/lib/mayan \
mayanedms/mayanedms:<version>

View File

@@ -0,0 +1,72 @@
Document types
==============
The basic unit of data in Mayan EDMS is the **document type**. A document
type can be interpreted also as a document category, a document class, or a
document template. Every other aspect of the system will rely or be tied to
one or more document type. Create one document type for each type or class of
document you intend to upload into Mayan EDMS.
Document types need to be created before documents can be
uploaded. It is not possible to upload documents without assigning them a
document type.
Document types usually mirror the type of physical, paper document they
represent.
Example document types:
* Letter
* Invoice
* Timesheet
* Blueprint
.. blockdiag::
blockdiag {
default_shape = roundedbox
document_type [ label = 'each document type' ];
documents [ label = 'many documents' ];
document_type -> documents;
}
Examples:
.. blockdiag::
blockdiag {
default_shape = roundedbox
document_type [ label = 'Invoice' ];
documents_1 [ label = 'invoice_001.pdf', width=200 ];
documents_2 [ label = 'invoice_032.pdf', width=200 ];
document_type -> documents_1, documents_2;
}
.. blockdiag::
blockdiag {
default_shape = roundedbox
document_type [ label = 'Receipts' ];
documents_1 [ label = 'groceries_18-01-11.pdf', width=200 ];
documents_2 [ label = 'car_payment-17-01-02.png', width=200 ];
document_type -> documents_1, documents_2;
}
Settings and attributes are applied to document types and documents will
inherit those settings and attributes based on the document type they were
assigned when uploaded into Mayan EDMS. A document can only be of one
type at a given moment, but if needed, the type of a document can be changed.
Upon changing its type, the document will lose its previous settings and
attributes, and will inherit the settings and attributes of its new type.
Document types are create in the
:menuselection:`System --> Setup --> Document types` menu.

View File

@@ -1,6 +1,6 @@
============
************
File storage
============
************
The files are stored and placed under Mayan EDMS "control" to avoid
filename clashes each file gets renamed to its ``UUID`` (Universally Unique ID),
@@ -9,6 +9,7 @@ without extension, and stored in a simple flat arrangement in a directory.
.. blockdiag::
blockdiag {
default_shape = roundedbox
file [ label = 'mayan_1-1.pdf', width=120];
document [ label = 'mayan/media/document_storage/ab6c1cfe-8a8f-4a30-96c9-f54f606b9248', width=450];
file -> document [label = "upload"];

View File

@@ -0,0 +1,115 @@
Index examples
--------------
Index of document types
^^^^^^^^^^^^^^^^^^^^^^^
This index will create one level for each document type in the system and place
links to the document of each respective type.
#. Go to the :menuselection:`System --> Setup --> Indexes` menu.
#. Create a new index using :menuselection:`Actions --> Create new`.
#. Give it a label to describe it, and an internal name. The internal name is
used when referencing this index in other parts of the system.
#. Press the :menuselection:`Template` link of the newly created index.
#. Select :menuselection:`New child node` to create a new level in which the
following template code will be entered.
::
{{ document.document_type }}
#. Save the template.
#. Go to :menuselection:`Document types` and associate this index with
existing document types in the system.
#. Finally go to :menuselection:`Tools --> Rebuild indexes` to execute the
index template. The rebuild process is only necessary when changes are
made to the index templates. Otherwise they update automatically whenever
a new document is uploaded or existing documents properties are modified.
#. A new index should appear under :menuselection:`Indexes` menu.
You can also program different behavior based on the different document types,
by use a comparison and a conditional statement. As the document_type itself
is not a string you cannot directly use that for that comparison. You will have
to use the label of the document type.
For example::
{% if document.document_type.label == "Invoice" or document.document_type.label == "Letter" %}
Correspondence
{% else %}
{{ document.document_type }}
{% endif %}
This will create and index level for each document type. Except for documents
of types "Invoice" and "Letter", these will now go into the level "Correspondence".
Index document by department, taken from the first character of the invoice number metadata
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Requires one index node with the template::
{% if document.metadata_value_of.invoice_number.0 == "A" %}Accounting
{% if document.metadata_value_of.invoice_number.0 == "H" %}Human Resources
{% endif %}
Nested date index from a date contained in a metadata
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Assuming the metadata type is named **date_issued** with a date format
of YYYY-MM-DD. The target is to have two levels: one for years and another
sub level for months.
**First level: Year**
::
{{ document.metadata_value_of.date_issued|slice:"0:4" }}
**Second level: Months**
::
{{ document.metadata_value_of.date_issued|slice:"5:7" }}
**Optional: Third level: Day**
::
{{ document.metadata_value_of.date_issued|slice:"8:10" }}
Index by OCR content
^^^^^^^^^^^^^^^^^^^^
This example indexes documents in a "quarterly report" level if they have the
fragment “quarterly report” in the OCR text::
{% if "quarterly report" in document.ocr_content.lower() %}Quarterly reports{% endif %}
The same applies to text content extracted for the document::
{% if "quarterly report" in document.content.lower() %}Quarterly reports{% endif %}
Index documents not found in any cabinet
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
::
{% if document.cabinets.count == 0 %}No Cabinets{% endif %}
Index untagged documents
^^^^^^^^^^^^^^^^^^^^^^^^
::
{% if document.tags.count == 0 %}No Tags{% endif %}
Index documents specifically, by the year of a metadata field otherwise by their uploaded year
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
::
{% for tag in document.tags.all %}{% if tag.label == "Taxes" %}{% if document.metadata_value_of.tax_year|length_is:"4" %}{{ document.metadata_value_of.tax_year }}{% else %}{{ document.date_added|date:"Y" }}{% endif %}{% endif %}{% endfor %}

View File

@@ -1,11 +1,10 @@
=======
Indexes
=======
Indexes are an automatic method to hierarchically organize documents in
relation to their properties (:doc:`metadata`, label, MIME type, etc). To use
indexes you need to first create an index template. Once created, associate
the index to one or more :doc:`document_types`.
relation to their properties (:doc:`../chapters/metadata`, label, MIME type,
etc). To use indexes you need to first create an index template. Once created,
associate the index to one or more :doc:`../chapters/document_types`.
Index are hierarchical models so a tree template needs to be specified for them.
This tree template will contain references to document metadata or properties
@@ -23,6 +22,9 @@ Example:
.. blockdiag::
blockdiag {
default_shape = roundedbox
span_width = 30;
index [ label = 'Product sheets per year', width=180 ];
root [ label = 'Root (Has document links? No)', width=450];
level_2 [ label = '{{ document.metadata_value_of.product_year }} (Has document links? Yes)', width=450];
@@ -50,6 +52,8 @@ that will be generate based on the tree template would be as follows:
.. blockdiag::
blockdiag {
default_shape = roundedbox
index [ label = 'Product sheets per year', width=180 ];
year_1 [ label = '2001', width = 60 ];
year_2 [ label = '2002', width = 60 ];
@@ -72,8 +76,11 @@ that will be generate based on the tree template would be as follows:
}
.. include:: ../chapters/index_examples.rst
Mirroring
=========
---------
Indexes can be exported as `FUSE <https://en.wikipedia.org/wiki/Filesystem_in_Userspace>`_
filesystems. Using the management command ``mountindex`` we could export the
@@ -89,5 +96,20 @@ via the network with network file system software like
`Samba <https://www.samba.org/>`_ or
`NFS <https://en.wikipedia.org/wiki/Network_File_System>`_.
.. blockdiag::
blockdiag {
orientation = portrait
span_width = 200;
index [ label = 'Product sheets per year', width=180 ];
block_device [ height = 100, label = "Block device\n(Hard drive)", shape = flowchart.database ];
network [ label = "Network", shape = cloud ];
user [ label = "Users", shape = actor ];
index -> block_device [ label = "mirroring", fontsize = 8 ];
block_device -> network -> user;
}
Indexes and mirrored indexes are Read Only as they are generated as a result of
prior activities like document uploads, metadata changes.

View File

@@ -0,0 +1,36 @@
*********
Languages
*********
The list of languages choices in the language dropdown used for documents is
based on the current ISO 639 list. This list can be quite extensive. To reduce
the number of languages available use the setting ``DOCUMENTS_LANGUAGE_CODES``,
and set it to a nested list of abbreviations. This setting can be found in the
:menuselection:`System --> Setup -> Settings -> Common` menu.
For example, to reduce the list to just English and Spanish use
::
DOCUMENTS_LANGUAGE_CODES = ('eng', 'spa')
The default language to appear on the dropdown can also be configured using::
DOCUMENTS_LANGUAGE = 'spa'
Use the correct ISO 639-3 language abbreviation (https://en.wikipedia.org/wiki/ISO_639)
as this code is used in several subsystems in Mayan EDMS such as the OCR app
to determine how to interpret the document.
If using the Docker image, these settings can also be passed to the container
as environment variables by prepending the ``MAYAN_`` suffix.
Example::
-e MAYAN_DOCUMENTS_LANGUAGE_CODES='["eng", "spa"]'
For more information check out the
:ref:`environment variables <environment_variables>` chapter of the
:doc:`../topics/settings` topic.

22
docs/chapters/mailing.rst Normal file
View File

@@ -0,0 +1,22 @@
*****************
Mailing documents
*****************
Sending emails in Mayan EDMS is controlled by two different system depending on
the type of email being sent. These are administrative emails like password
reset emails and user emails sent from the application. To configure
administrative email for things like password reset check the topic:
:doc:`../topics/administration`
Application emails
==================
To allow users to send emails or documents from within the web interface,
Mayan EDMS provides its our own email system called Mailing Profiles.
Mailing Profiles support access control per user role and can use different
email backends. Mailing Profiles are created from the
:menuselection:`System --> Setup` menu.
Once created mailing profiles allow users to send email messages from
within the user interface containing either an URL link to the document or
the actual document as an attachment.

View File

@@ -1,6 +1,6 @@
========
********
Metadata
========
********
Metadata is the name of the attribute of a document. The concept of metadata is
divided in two: **metadata types** (size, color, distance) and **metadata values** for

View File

@@ -0,0 +1,60 @@
**************
Object storage
**************
It is possible to use object storage instead of the default filesystem based
storage. One such object storage system is Amazon S3 (Simple Storage Service)
API compatible object storage. The following steps will configure Mayan EDMS
to use a S3 style storage for documents.
1. Install the django-storages and boto3 Python libraries.
* For the direct deployment method of installation use::
pip install django-storages boto3
* or if using the Docker image, add the following the command line that runs the container::
-e MAYAN_PIP_INSTALLS='django-storages boto3'
2. From the web interface navigate to the :menuselection:`System --> Setup --> Setting --> Documents` menu.
3. Locate the **DOCUMENTS_STORAGE_BACKEND** setting, press **Edit** and enter::
storages.backends.s3boto3.S3Boto3Storage
4. Save and locate the setting **DOCUMENTS_STORAGE_BACKEND_ARGUMENTS**, press **Edit** and enter::
'{access_key: <your S3 access key>, secret_key: <your S3 secret key>, bucket_name: <S3 bucket name>}'
5. Save and restart your Mayan EDMS installation for the setting to take effect.
Storage
=======
Mayan EDMS stores documents in their original file format only changing the
filename to avoid collision. For best input and output speed use a block
based local filesystem for the ``/media`` sub folder of the path specified by
the MEDIA_ROOT setting. For increased storage capacity use an object storage
filesystem like S3.
To use a S3 compatible object storage do the following:
* Install the Python packages ``django-storages`` and ``boto3``:
* Using Python::
pip install django-storages boto3
* Using Docker::
-e MAYAN_PIP_INSTALLS='django-storages boto3'
On the Mayan EDMS user interface, go to ``System``, ``Setup``, ``Settings``,
``Documents`` and change the following setting:
* ``DOCUMENTS_STORAGE_BACKEND`` to ``storages.backends.s3boto3.S3Boto3Storage``
* ``DOCUMENTS_STORAGE_BACKEND_ARGUMENTS`` to ``'{access_key: <your access key>, secret_key: <your secret key>, bucket_name: <bucket name>}'``.
Restart Mayan EDMS for the changes to take effect.

View File

@@ -1,10 +1,10 @@
===========
***********
OCR backend
===========
***********
Mayan EDMS ships an OCR backend that uses the FLOSS engine Tesseract
(https://github.com/tesseract-ocr/tesseract/), but it can
use other engines. To support other engines crate a wrapper that subclasess the
use other engines. To support other engines crate a wrapper that subclasses the
``OCRBackendBase`` class defined in mayan/apps/ocr/classes. This subclass should
expose the ``execute`` method. For an example of how the Tesseract backend
is implemented take a look at the file ``mayan/apps/ocr/backends/tesseract.py``
@@ -18,4 +18,9 @@ To add support to OCR more languages when using Tesseract, install the
corresponding language file. If using a Debian based OS, this command will
display the available language files:
apt-cache search tesseract-ocr
apt-cache search tesseract-ocr
If using the Docker image, pass the environment variable MAYAN_APT_INSTALLS
with the corresponding Tesseract language option. Example::
-e MAYAN_APT_INSTALLS='tesseract-ocr-deu'

View File

@@ -0,0 +1,39 @@
**************
Password reset
**************
To use the password reset feature, administrative emails need to be configured.
These are sent by the system itself and not by the users. Their usage and
configuration is different than the
:doc:`email system used to share documents via email<../chapters/mailing>`.
Sending administrative emails
=============================
To be able to send password reset emails configure the Django email settings
via the :ref:`configuration file <configuration_file>`.
Example::
DEFAULT_FROM_EMAIL: '<your administrator email>'
EMAIL_BACKEND: django.core.mail.backends.smtp.EmailBackend
EMAIL_HOST: '<your smtp ip address or hostname>'
EMAIL_HOST_PASSWORD: '<your smtp password>'
EMAIL_HOST_USER: '<your smtp username>'
EMAIL_PORT: 25 # or 587 or your server's SMTP port
EMAIL_TIMEOUT:
EMAIL_USE_SSL: true
EMAIL_USE_TLS: false
To change the reference URL in the password reset emails on in the
default document mailing template modify the ``COMMON_PROJECT_URL`` setting.
For information on the different ways to change a setting check the
:doc:`../topics/settings` topic.
To test the email settings use the management command ``sendtestemail``.
Example::
mayan-edms.py sendtestemail myself@example.com

View File

@@ -0,0 +1,48 @@
*******************
Password validation
*******************
To help reduce the use of weak passwords, Mayan EDMS includes support for
password validators. Password validator enforce policies by rejecting
password that don't conform with the validator's logic.
By default, Mayan EDMS sets this password validation setup:
- That the password is not similar no any user attributes.
- A minimum password size of 8 characters.
- The password is not one of the 20,000 commonly used weak password.
- That the password is not entirely numeric.
This default is coded in the following manner by the default Python setup file::
AUTH_PASSWORD_VALIDATORS = [
{
'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
},
{
'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',
},
{
'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',
},
{
'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',
},
]
If using the YAML configuration file the same setup would be coded in the
following manner::
AUTH_PASSWORD_VALIDATORS:
- NAME: django.contrib.auth.password_validation.UserAttributeSimilarityValidator
- NAME: django.contrib.auth.password_validation.MinimumLengthValidator
- NAME: django.contrib.auth.password_validation.CommonPasswordValidator
- NAME: django.contrib.auth.password_validation.NumericPasswordValidator
In addition to the password validators provided by Django
:django-docs:`validators provided by Django <topics/auth/passwords/#included-validators>`,
Mayan EDMS adds the following validators:
.. autoclass:: mayan.apps.authentication.validators.MinimumCapitalLettersContentValidator
.. autoclass:: mayan.apps.authentication.validators.MinimumNumberContentValidator

View File

@@ -1,6 +1,6 @@
===========
***********
Permissions
===========
***********
Mayan EDMS provides very fine control over which actions users can
perform. Action control works by allowing ``roles``, that are composed of
@@ -10,6 +10,11 @@ that permission can exercise it throughout the entire system.
.. blockdiag::
blockdiag {
orientation = portrait
default_shape = roundedbox
span_width = 240;
span_height = 100;
user [ label = 'Users' ];
group [ label = 'Groups' ];
role [ label = 'Roles' ];

View File

@@ -0,0 +1,171 @@
**********
Scaling up
**********
The default installation method fits most use cases. If you use case requires
more speed or capacity here are some suggestion that can help you improve the
performance of your installation.
Change the database manager
===========================
Use PostgreSQL or MySQL as the database manager.
Tweak the memory setting of the database manager to increase memory allocation.
More PostgreSQL specific examples are available in their wiki page:
https://wiki.postgresql.org/wiki/Performance_Optimization
Increase the number of Gunicorn workers
=======================================
The Gunicorn workers process HTTP requests and affect the speed at which the
website responds.
If you are using the Docker image, change the value of the
``MAYAN_GUNICORN_WORKERS`` environment variable (check the Docker image chapter:
:ref:`docker_environment_variables`). Normally this variable defaults to 2.
Increase this number to match the number of CPU cores + 1.
If you are using the direct deployment methods, change the line that reads::
command = /opt/mayan-edms/bin/gunicorn -w 2 mayan.wsgi --max-requests 500 --max-requests-jitter 50 --worker-class gevent --bind 0.0.0.0:8000 --timeout 120
And increase the value of the ``-w 2`` argument. This line is found in the
``[program:mayan-gunicorn]`` section of the supervisor configuration file.
Background task processing
==========================
The Celery workers are system processes that take care of the background
tasks requested by the frontend interactions like document image rendering
and periodic tasks like OCR. There are several dozen tasks defined in the code.
These tasks are divided into queues based on the app of the relationship
between the tasks. The queues by default are divided into three groups
based on the speed at which they need to be processed. The document page
image rendering for example is categorized as a high volume, short duration
task. The OCR is a high volume, long duration task. Email checking is a
low volume, medium duration tasks. It is not advisable to have the same
worker processing OCR to process image rendering too. If the worker is
processing several OCR tasks it will not be able to provide fast images
when an user is browsing the user interface. This is why by default the
queues are split into 3 workers: fast, medium, and slow.
The fast worker handles the queues:
* converter: Handles document page rendering
* sources_fast: Does staging file image rendering
The medium worker handles the queues:
* checkouts_periodic: Scheduled tasks that check if a document's checkout
period has expired
* documents_periodic:
* indexing: Does reindexing of documents in the background when their
properties change
* metadata:
* sources:
* sources_periodic: Checking email accounts and watch folders for new
documents.
* uploads: Processes files to turn the into Mayan documents. Processing
encompasses MIME type detection, page count detection.
* documents:
The slow worker handles the queues:
* mailing: Does the actual sending of documents via email as requested by
users via the mailing profiles
* tools: Executes in the background maintenance requests from the options
in the tools menu
* statistics: Recalculates statistics and charts
* parsing: Parses documents to extract actual text content
* ocr: Performs OCR to transcribe page images to text
Optimizations
-------------
* Increase the number of workers and redistribute the queues among them
(only possible with direct deployments).
* Launch more workers to service a queue. For example for faster document
image generation launch 2 workers to process the converter queue only
possible with direct deployments).
* By default each worker process uses 1 thread. You can increase the thread
count of each worker process with the Docker environment options:
* MAYAN_WORKER_FAST_CONCURRENCY
* MAYAN_WORKER_MEDIUM_CONCURRENCY
* MAYAN_WORKER_SLOW_CONCURRENCY
* If using direct deployment, increase the value of the --concurrency=1
argument of each worker in the supervisor file. You can also remove this
argument and let the Celery algorithm choose the number of threads to
launch. Usually this defaults to the number of CPU cores + 1.
Change the message broker
=========================
Messages are the method of communication between front end interactive code
and background tasks. In this regard messages can be thought as homologous
to tasks requests. Improving how many messages can be sent, stored and
sorted will impact the number of tasks the system can handle. To save on
memory, the basic deployment method and the Docker image default to using
Redis as a message broker. To increase capacity and reduce volatility of
messages (pending tasks are not lost during shutdown) use RabbitMQ to
shuffle messages.
For direct installs refer to the :ref:`deployment_advanced` documentation
section for the required changes.
For the Docker image, launch a separate RabbitMQ container
(https://hub.docker.com/_/rabbitmq/)::
docker run -d --name mayan-edms-rabbitmq -e RABBITMQ_DEFAULT_USER=mayan -e RABBITMQ_DEFAULT_PASS=mayanrabbitmqpassword -e RABBITMQ_DEFAULT_VHOST=mayan rabbitmq:3
Pass the MAYAN_CELERY_BROKER_URL environment variable (https://kombu.readthedocs.io/en/latest/userguide/connections.html#connection-urls)
to the Mayan EDMS container so that it uses the RabbitMQ container the
message broker::
-e MAYAN_CELERY_BROKER_URL="amqp://mayan:mayanrabbitmqpassword@localhost:5672/mayan",
When tasks finish, they leave behind a return status or the result of a
calculation, these are stored for a while so that whoever requested the
background task, is able retrieve the result. These results are stored in the
result storage. By default a Redis server is launched inside the Mayan EDMS
container. You can launch a separate Docker Redis container and tell the Mayan
EDMS container to use this via the MAYAN_CELERY_RESULT_BACKEND environment
variable. The format of this variable is explained here: http://docs.celeryproject.org/en/3.1/configuration.html#celery-result-backend
Deployment type
===============
Docker provides a faster deployment and the overhead is not high on modern
systems. It is however memory and CPU limited by default and you need to
increase this limits. The settings to change the container resource limits
are here: https://docs.docker.com/config/containers/resource_constraints/#limit-a-containers-access-to-memory
For the best performance possible use the advanced deployment method on a
host dedicated to serving only Mayan EDMS.
Storage
=======
For best input and output speed use a block based local filesystem on an
SSD drive for the ``/media`` sub folder. The location of the ``/media`` folder
will be specified by the ``MEDIA_ROOT`` setting.
If capacity is your bottom line, switch to an
:doc:`object storage <../chapters/object_storage>` system.
Use additional hosts
====================
When one host is not enough you can use multiple hosts and share the load.
Make sure that all hosts share the ``/media`` folder as specified by the
``MEDIA_ROOT`` setting, also the database, the broker, and the result storage.
One setting that needs to be changed in this configuration is the lock
manager backend.
Resource locking is a technique to avoid two processes or tasks to modify
the same resource at the same time causing a race condition. Mayan EDMS uses
its own lock manager. By default the lock manager with use a simple file
based lock backend ideal for single host installations. For multiple hosts
installation the database backend must be used in other to coordinate the
resource locks between the different hosts over a share data medium. This is
accomplished by modifying the environment variable ``LOCK_MANAGER_BACKEND`` in
both the direct deployment or the Docker image. Use the value
``lock_manager.backends.model_lock.ModelLock`` to switch to the database
resource lock backend. If you can also write your own lock manager backend
for other data sharing mediums with better performance than a relational
database like Redis, Memcached, Zoo Keeper.

114
docs/chapters/settings.rst Normal file
View File

@@ -0,0 +1,114 @@
********
Settings
********
Mayan EDMS can be configure via environment variables or by setting files.
.. _environment_variables:
Via environment variables
=========================
To use environment variables, lookup the name of the setting you want to
override in the "Settings" menu. The "Settings" menu is located inside the
"Setup" main menu. To pass a value via an environment variable append
``"MAYAN_"`` to the name of the settings option. For example, to change
the number of documents displayed per page (COMMON_PAGINATE_BY, by default 40),
use::
export MAYAN_COMMON_PAGINATE_BY=10
Restart Mayan EDMS and the new value will take effect. The "Settings" menu
can be used to verify if the overridden setting value is being interpreted
correctly.
.. _configuration_file:
Via YAML configuration file
===========================
.. versionadded:: 3.1
It is possible to modify the different settings by creating or editing the
``media/config.yml`` file. This file is formatted in the YAML markup language (
http://yaml.org/). Here is an example of what the looks like::
DOCUMENT_PARSING_AUTO_PARSING: true
DOCUMENT_PARSING_PDFTOTEXT_PATH: /usr/bin/pdftotext
DEFAUL_FROM_EMAIL: mayan.admin@example.com
EMAIL_BACKEND: django.core.mail.backends.smtp.EmailBackend
EMAIL_HOST: localhost
EMAIL_HOST_PASSWORD: ''
EMAIL_HOST_USER: ''
EMAIL_PORT: 25
EMAIL_TIMEOUT: null
EMAIL_USE_SSL: false
EMAIL_USE_TLS: false
FILE_UPLOAD_MAX_MEMORY_SIZE: 2621440
HOME_VIEW: common:home
Every time Mayan EDMS is able to start correctly it will copy the ``config.yml``
and create a backup copy in the same directory named ``config_backup.yml``.
This file is used to revert to the last know configuration file known
to be valid. You can revert manually by copy the file or by using the
``revertsettings`` management command from the command line.
Via Python settings files
=========================
Another way to configure Mayan EDMS is via Python-style, settings files.
If Mayan EDMS was installed using the Python package a ``mayan_settings``
folder will created for this purpose. If you installed Mayan EDMS
according to the :doc:`../chapters/deploying` instructions provided in this
documentation your ``mayan_settings`` folder should be located in the directory:
``/usr/share/mayan-edms/mayan/media/mayan_settings``.
If Mayan EDMS was installed using Docker, the ``mayan_settings`` folder
will be found inside the install Docker volume. If you installed Mayan EDMS
according to the :doc:`../chapters/docker` instructions provided in this
documentation your ``mayan_settings`` folder should be located in the directory:
``/docker-volumes/mayan/mayan_settings``.
Create a file with any valid name and a ``.py`` extension in the
``mayan_settings`` folder. The file must starts with a global import of
``mayan.settings.production``. In the form::
from mayan.settings.production import *
Now add the corresponding lines to override the default settings.
In the settings file, it is not necessary to prepend the string ``MAYAN_`` to
the setting option. For example, to change the number of documents displayed
per page (COMMON_PAGINATE_BY, by default 40),
use::
COMMON_PAGINATE_BY=10
versus::
export MAYAN_COMMON_PAGINATE_BY=10
when using the environment variable method.
For this example let's assume the file was saved with the name ``mysettings.py``.
The way used to tell Mayan EDMS to import this file will vary based on the
installation method.
For the :doc:`../chapters/deploying` method, the full import path will be
``mayan.media.mayan_settings.mysettings`` and can be passed via the
``--settings`` command line argument like this::
python manage.py runserver --settings=mayan.media.mayan_settings.mysettings
or via the ``DJANGO_SETTINGS_MODULE`` environment variable like this::
export DJANGO_SETTINGS_MODULE=mayan.media.mayan_settings.mysettings
For the :doc:`../chapters/docker` installation method, the full import path will be
``mayan_settings.mysettings`` and can only be passed via the
``MAYAN_SETTINGS_MODULE`` environment variable like this::
docker run <...> -e MAYAN_SETTINGS_MODULE=mayan_settings.mysettings

View File

@@ -1,6 +1,6 @@
===================
*******************
Document signatures
===================
*******************
Mayan EDMS supports two types of document signatures: embedded and
detached signatures. When a document with an embedded signature is
@@ -8,6 +8,25 @@ uploaded, this signature is readily detected as part of the document
inspection step. The status of the signature can be verified by accessing the
signatures sections of a document.
.. blockdiag::
blockdiag {
orientation = portrait
span_width = 240;
user [ shape = "actor" ];
key [ shape = flowchart.database, label = "Key" ];
document [ shape = "note", label = "Document" ];
document_signed [ label = "Signed\nDocument" ];
key -> user -> document -> document_signed;
}
Signed documents are tamper-proof. That means that if any part of the document's
file is edited (even just one character or one pixel), the document's
signature becomes invalid alerting that an unauthorized change has occurred.
Existing non signed documents can be signed in one of two ways:
by downloading the document, signing it, and uploading the signed document
as a new version of the existing one or by creating a detached signature for
@@ -21,6 +40,6 @@ keys no longer needed can also be deleted from this menu.
Only `GNU Privacy Guard`_ signatures are support at the moment.
Only version 1 of `GNU Privacy Guard`_ is supported for now.
Only version 1 of `GNU Privacy Guard`_ is supported at the moment.
.. _`GNU Privacy Guard`: www.gnupg.org/

View File

@@ -1,4 +1,3 @@
===========
Smart links
===========
@@ -7,7 +6,7 @@ in their respective indexes. Smart links are useful when two documents are
related somehow but are of different type or different hierarchical units.
Example: A patient record can be related to a prescription drug information
document, but they each belong to their own :doc:`indexes`.
document, but they each belong to their own :doc:`../chapters/indexes`.
Smart links are rule based, but don't create any organizational structure.
Smart links just show the documents that match the rules as evaluated against

View File

@@ -1,4 +1,3 @@
=======
Sources
=======
@@ -16,7 +15,7 @@ The current document sources supported are:
- IMAP email - Same as the ``POP3`` email source but for email accounts using
the ``IMAP`` protocol.
- Watch folder - A filesystem folder that is scanned periodically for files.
Any file in the watch folder is automatically uploaded.
Any file found in the watch folder is uploaded and subsequently deleted.
- 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
@@ -31,6 +30,27 @@ The current document sources supported are:
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.
.. blockdiag::
blockdiag {
mayan [shape = "roundedbox", label = "Mayan EDMS" ];
email_pop3 [shape = "mail", label = "e-mail (POP3)"];
email_imap [shape = "mail", label = "e-mail (IMAP)"];
staging [shape = "flowchart.database", label = "Staging folder" ];
watch [shape = "flowchart.database", label = "Watch folder" ];
automatic [shape = "box", label = "Automatic\n(via schedule)" ];
manual [shape = "actor", height=60, label = "Manual\n(user interaction)" ];
web [shape = "note", label = "Webform upload" ];
automatic -> mayan;
email_pop3 -> automatic;
email_imap -> automatic;
watch -> automatic;
manual -> mayan;
staging -> manual;
web -> manual;
}
Document source can be configure to allow document bundles to uploaded as
compressed files which are decompressed and their content uploaded as separate
documents. This feature is useful when migrating from another document

23
docs/chapters/tags.rst Normal file
View File

@@ -0,0 +1,23 @@
Tags
====
Tags are color coded properties that can be attached or removed from documents.
Tags allow giving documents a binary property. Documents can also be tagged
with more than one tag.
Tags are created from the :menuselection:`Tags --> Create` menu.
To view all created tags use the :menuselection:`Tags --> All` menu.
Once tagged, documents can be searched by their tags. It is also possible to
show all the documents tagged with a particular
tag via the **Documents** link of each tag.
To view, add, or remove tags from a specific document, go to the document view
and click on the **Tags** tab. This view will show the current tags of a
document. The **Actions** menu will now show two new options: one to attach
more tags to the document and another to remove tags from the document.
It is also possible to tag documents in bulk by selecting several documents
from any view that displays a list documents and selecting the **Attach tag**
or **Remove tags** from the dropdown menu.

View File

@@ -1,6 +1,6 @@
===============
***************
Transformations
===============
***************
Transformations are persistent manipulations to the previews of the stored
documents. For example: a scanning equipment may only produce landscape PDFs.

View File

@@ -1,6 +1,6 @@
============
************
Translations
============
************
Translations are handled online via the **Transifex** website:
https://www.transifex.com/projects/p/mayan-edms/. To create a translation team

View File

@@ -0,0 +1,84 @@
*************
Upload wizard
*************
The steps needed to upgrade a document using form-tools' ``SessionWizard``
were hardcoded in the ``source`` app. This made it very difficult to add or remove
wizard steps.
The steps of the wizard are now defined by a new class called
``sources.wizard.WizardStep``. The existing steps to select a document type,
enter metadata and tag the document, have been converted to function as
``WizardSteps`` subclasses. The converted steps now live in
``sources.wizards.WizardStepDocumentType``, ``tag.wizard_steps.WizardStepTags``,
and ``metadata.wizard_steps.WizardStepMetadata``.
The steps need to define the following methods:
- ``done``: This method is execute when the wizard finished the last step
an enter the step where the actual file are uploaded. This steps is used
to encode form data into the URL query string that will be passed to the
document upload view for each file uploaded.
- ``condition``: This method is used to display the step conditionally.
If this method return True it will be displayed during the upload wizard
execution. To skip the step, return False or None.
- ``get_form_initial``: This method is used to return the initial data
for the step form. Use this method to set up initial values for the step's
form fields.
- ``step_post_upload_process``: This method will be executed once the
document finishes uploading. Use this method to process the information
encoded in the URL querystring by the step's `done`` method.
Once the ``WizardStep`` subclass is defined, it needs to be registered. This
is done by calling the ``.register`` method of the ``WizardStep`` class with
the subclass as the argument. Example::
WizardStep.register(WizardStepMetadata)
This statement must be located after the subclass definition. Finally,
the module defining the wizard step must be imported so that it is loaded
with the rest of the code and enabled. The best place to do this is in the
``.ready`` method of the apps' ``apps.py`` module. Example::
class TagsApp(MayanAppConfig):
has_rest_api = True
has_tests = True
name = 'tags'
verbose_name = _('Tags')
def ready(self):
super(TagsApp, self).ready()
from actstream import registry
from .wizard_steps import WizardStepTags # NOQA
The ``WizardStep`` class also allows for unregistering existing steps. This
is accomplished by calling the ``.deregister`` method of the ``WizardStep``
class and passing the subclass as the argument. This method should
also be called inside the ``.ready`` method of an apps' ``apps.py``
module. Example::
class TagsApp(MayanAppConfig):
has_rest_api = True
has_tests = True
name = 'tags'
verbose_name = _('Tags')
def ready(self):
super(TagsApp, self).ready()
from actstream import registry
from metadata.wizard_steps import WizardStepMetadata # NOQA
from sources.wizards import WizardStep # NOQA
from .wizard_steps import WizardStepTags # NOQA
WizardStep.deregister(WizardStepTags)
This will cause the tags assignment step to not be assigned to the upload
wizard anymore.

View File

@@ -0,0 +1,48 @@
*******************
Document versioning
*******************
Mayan EDMS has the ability to store different versions of the same
document. A comment field is provided to allow users to summarize the new
version changes in comparison with the previous one. If a new version was
uploaded by mistake or such new version is no longer necessary the option to
revert to a previous version of the document is provided.
.. blockdiag::
blockdiag {
default_shape = roundedbox
orientation = portrait
node_width = 200;
version_1 [ label = "Version 1" ];
version_2 [ label = "Version 2" ];
document_1 [ label = "payroll_report.pdf" ];
document_2 [ label = "payroll_report_fixed.pdf" ];
upload_1 [ label = "payroll_report.pdf" ];
upload_2 [ label = "payroll_report_fixed.pdf" ];
upload_1 -> version_1 -> document_1;
upload_2 -> version_2 -> document_2;
document_1 -> document_2;
}
Only the interactive document sources (:doc:`../chapters/sources`)
(``Web`` and ``Staging folders``) are available to upload new document versions.
There is no limit to the number of versions a document can have.
.. blockdiag::
blockdiag {
default_shape = roundedbox
orientation = portrait
node_width = 200;
document [ label = "payroll_report.pdf" ];
versions [ label = "Versions", stacked ];
document -> versions;
}
By default, the last version will be showed when working with the document
but any of the versions can be inspected and viewed.

View File

@@ -0,0 +1,91 @@
*********
Workflows
*********
Introduction
============
Workflows provide a structure method for storing a sequence of states over
which the a document will progress. Workflows keep track how a document has
been processed so far.
Workflows work by storing a series of states to help you know the "status"
of a document. To move a workflow from one state to another, transitions are
used.
Transitions connect two different states and help provide context to know
which state is possible to transition to, from a previous state. Transitions
provide and order for the sequence of possible states changes.
Transitions can be executed manually by users if they have the required access
level as configure by the system administrator.
Automation
==========
Besides being able to be executed manually by users, transitions can also be
programmed execute automatically based on system events. This is called in
Mayan EDMS transition triggering and is one of the tools available to
automate business processes.
For example:
* Move a document from a "scanned" state to a "billed" state
when a tag is attached to the document.
* Move a document from a "uploaded" state to a "OCR ready" state
when the OCR engine finishes processing the document.
The other tool provided for process automation is being able to execute an
action when a workflow state is reached or leaved. These are called state
events.
Some examples of state actions currently provided are:
* Attach a tag to a document
* Remove a tag from a document
* Do an HTTP POST request to an external IP address
* Edit the label or the description of a document.
Other time more state actions are being added. Some state actions like the one
that creates an HTTP POST request allow Mayan EDMS to trigger processes in
external systems based on the state of a document. One example of this is
triggering the billing process of an accounting system when an invoice is
scanned in Mayan EDMS.
Workflow state actions and transitions triggers are new features and are still
evolving.
Workflows allow translating business logic into a series of states. With the
addition of state actions and transition triggers, the workflows in Mayan EDMS
are no longer just informative but can be part of your actual business
automation process.
Implementation
==============
Internally, workflows are implemented as a finite state machines
(https://en.wikipedia.org/wiki/Finite-state_machine). And have the limitation
that only one state can be the current active state for a workflow being
executed. The other limitation of the current implementation is that every
workflow needs at least one state marked as the initial state. These limitations
are the result of a compromised in the design between flexibility and ease of
use.
Visualizations
==============
The graphical representation of a workflow (or a finite state machine style
in Mayan EDMS's case) is similar to a flowchart. The states are represented
with circles. The transitions are represented with arrows. Circle with a
double border represent the initial state of the workflow.
To view the graphical representations of workflow use **Preview** button of
the workflow in the setup view.
We are working now on workflow transition trigger filters to have
the trigger move the state of the workflow on certain conditions. For example: Attach a tag if there is a specific word found in the OCR text.

View File

@@ -13,7 +13,8 @@ from __future__ import unicode_literals
# All configuration values have a default; values that are commented out
# serve to show the default.
import sys, os
import os
import sys
sys.path.insert(0, os.path.abspath('..'))
@@ -22,22 +23,25 @@ import mayan
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "_ext")))
sys.path.append(
os.path.abspath(os.path.join(os.path.dirname(__file__), '_ext'))
)
# -- General configuration -----------------------------------------------------
# If your documentation needs a minimal Sphinx version, state it here.
#needs_sphinx = '1.0'
# needs_sphinx = '1.0'
# Add any Sphinx extension module names here, as strings. They can be extensions
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
#extensions = ['sphinx.ext.autodoc', 'sphinx.ext.viewcode']
#extensions = ["djangodocs", "sphinx.ext.intersphinx"]
extensions = ['djangodocs', 'sphinxcontrib.blockdiag']
extensions = [
'sphinx.ext.autodoc', 'sphinx.ext.extlinks', 'sphinxcontrib.blockdiag',
'sphinxcontrib.spelling', 'sphinx.ext.viewcode'
]
blockdiag_antialias = True
blockdiag_html_image_format = "SVG"
blockdiag_latex_image_format = "PDF"
blockdiag_html_image_format = 'SVG'
blockdiag_latex_image_format = 'PDF'
# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
@@ -53,7 +57,7 @@ master_doc = 'index'
# General information about the project.
project = mayan.__title__
copyright = mayan.__copyright__
copyright = mayan.__copyright_short__
# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
@@ -67,20 +71,20 @@ release = version
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
#language = None
# language = None
# There are two options for replacing |today|: either, you set today to some
# non-false value, then it is used:
#today = ''
# today = ''
# Else, today_fmt is used as the format for a strftime call.
#today_fmt = '%B %d, %Y'
# today_fmt = '%B %d, %Y'
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
exclude_patterns = ['_build']
# The reST default role (used for this markup: `text`) to use for all documents.
#default_role = None
# default_role = None
# If true, '()' will be appended to :func: etc. cross-reference text.
add_function_parentheses = True
@@ -97,7 +101,7 @@ show_authors = False
pygments_style = 'sphinx'
# A list of ignored prefixes for module index sorting.
#modindex_common_prefix = []
# modindex_common_prefix = []
# -- Options for HTML output ---------------------------------------------------
@@ -109,26 +113,26 @@ html_theme = 'classic'
# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
# documentation.
#html_theme_options = {}
# html_theme_options = {}
# Add any paths that contain custom themes here, relative to this directory.
#html_theme_path = []
# html_theme_path = []
# The name for this set of Sphinx documents. If None, it defaults to
# "<project> v<release> documentation".
#html_title = None
# html_title = None
# A shorter title for the navigation bar. Default is the same as html_title.
#html_short_title = None
# html_short_title = None
# The name of an image file (relative to this directory) to place at the top
# of the sidebar.
#html_logo = None
# html_logo = None
# The name of an image file (within the static path) to use as favicon of the
# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
# pixels large.
#html_favicon = None
# html_favicon = None
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
@@ -137,115 +141,114 @@ html_static_path = ['_static']
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
# using the given strftime format.
#html_last_updated_fmt = '%b %d, %Y'
# html_last_updated_fmt = '%b %d, %Y'
# If true, SmartyPants will be used to convert quotes and dashes to
# typographically correct entities.
#html_use_smartypants = True
# html_use_smartypants = True
# Custom sidebar templates, maps document names to template names.
#html_sidebars = {}
# html_sidebars = {}
# Additional templates that should be rendered to pages, maps page names to
# template names.
#html_additional_pages = {}
# html_additional_pages = {}
# If false, no module index is generated.
#html_domain_indices = True
# html_domain_indices = True
# If false, no index is generated.
#html_use_index = True
# html_use_index = True
# If true, the index is split into individual pages for each letter.
#html_split_index = False
# html_split_index = False
# If true, links to the reST sources are added to the pages.
#html_show_sourcelink = True
# html_show_sourcelink = True
# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
#html_show_sphinx = True
# html_show_sphinx = True
# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
#html_show_copyright = True
# html_show_copyright = True
# If true, an OpenSearch description file will be output, and all pages will
# contain a <link> tag referring to it. The value of this option must be the
# base URL from which the finished HTML is served.
#html_use_opensearch = ''
# html_use_opensearch = ''
# This is the file name suffix for HTML files (e.g. ".xhtml").
#html_file_suffix = None
# html_file_suffix = None
# Output file base name for HTML help builder.
htmlhelp_basename = 'MayanEDMSdoc'
html_show_sourcelink = False
html_show_sphinx = False
# -- Options for LaTeX output --------------------------------------------------
# The paper size ('letter' or 'a4').
#latex_paper_size = 'letter'
# latex_paper_size = 'letter'
# The font size ('10pt', '11pt' or '12pt').
#latex_font_size = '10pt'
# latex_font_size = '10pt'
# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title, author, documentclass [howto/manual]).
latex_documents = [
('index', 'MayanEDMS.tex', 'Mayan EDMS Documentation',
mayan.__author__, 'manual'),
(
'index', 'MayanEDMS.tex', 'Mayan EDMS Documentation',
mayan.__author__, 'manual'
),
]
# The name of an image file (relative to this directory) to place at the top of
# the title page.
#latex_logo = None
# latex_logo = None
# For "manual" documents, if this is true, then toplevel headings are parts,
# not chapters.
#latex_use_parts = False
# latex_use_parts = False
# If true, show page references after internal links.
#latex_show_pagerefs = False
# latex_show_pagerefs = False
# If true, show URL addresses after external links.
#latex_show_urls = False
# latex_show_urls = False
# Additional stuff for the LaTeX preamble.
#latex_preamble = ''
# latex_preamble = ''
# Documents to append as an appendix to all manuals.
#latex_appendices = []
# latex_appendices = []
# If false, no module index is generated.
#latex_domain_indices = True
# latex_domain_indices = True
# -- Options for manual page output --------------------------------------------
# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
('index', 'mayanedms', 'Mayan EDMS Documentation',
('index', 'mayanedms', '{} Documentation'.format(mayan.__title__),
[mayan.__author__], 1)
]
html_theme = 'sphinx_rtd_theme'
# -- Custom options
import alabaster
html_theme_path = [alabaster.get_path()]
extensions.append('alabaster')
html_theme = 'alabaster'
html_sidebars = {
'**': [
'about.html', 'donate.html', 'navigation.html', 'searchbox.html',
]
# -- External links --
extlinks = {
'django-docs': (
'https://docs.djangoproject.com/en/{}/%s'.format(
mayan.__django_version__
), 'Django documentation section: '
),
'github-issue': (
'https://github.com/mayan-edms/mayan-edms/issues/%s', 'GitHub issue #'
),
'gitlab-issue': (
'https://gitlab.com/mayan-edms/mayan-edms/issues/%s', 'GitLab issue #'
)
}
html_theme_options = {
'description': mayan.__description__,
'github_button': False,
'travis_button': False,
'gratipay_user': 'rosarior',
'github_banner': False,
}
html_logo = '_static/logo_pyramid_only.png'

View File

@@ -1,6 +1,11 @@
Welcome to Mayan EDMS!
======================
.. image:: /_static/mayan_logo.png
:alt: Logo is a trademark of Roberto Rosario
:align: center
Mayan EDMS is a `Free Open Source`_ `Electronic Document Management System`_,
coded in the Python language using the Django_ web application framework and
released under the `Apache 2.0 License`_. It provides an electronic vault or
@@ -12,19 +17,22 @@ repository for electronic documents.
.. toctree::
:hidden:
Installation <topics/installation>
Features <topics/features>
Advanced deployment <topics/deploying>
Release notes and upgrading <releases/index>
Concepts <topics/index>
Development <topics/development>
App creation <topics/app_creation>
Roadmap <topics/roadmap>
Translations <topics/translations>
Contributors <topics/contributors>
Licensing <topics/license>
FAQ <topics/faq>
Contact <topics/contact>
topics/features
topics/installation
releases/index
topics/getting_started
topics/access_control
topics/categorization
topics/collaboration
topics/settings
topics/storage
topics/integration
topics/advanced
topics/administration
topics/development
topics/faq
topics/license
topics/contact
.. _Docker: https://www.docker.com/
.. _Django: http://www.djangoproject.com/

View File

@@ -0,0 +1,210 @@
MERC 1: Purpose and Guidelines
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
:MERC: 1
:Author: Michael Price
:Status: Accepted
:Type: Process
:Created: 2018-02-17
:Last-Modified: 2018-02-17
.. contents:: Table of Contents
:depth: 3
:local:
What is a MERC?
===============
A Mayan EDMS Request For Comment document or MERC document is a design
document providing information to the Mayan EDMS community, or
describing a new feature or process for Mayan EDMS. MERCs provide
concise technical specifications of features, along with rationales.
MERC Types
==========
There are three kinds of MERCs:
1. A **Feature** MERC describes a new feature or implementation
for Mayan EDMS. Most MERCs will be Feature MERCs.
2. An **Informational** MERC describes a Mayan EDMS design issue, or
provides general guidelines or information to the Mayan EDMS community,
but does not propose a new feature. Informational MERCs do not
necessarily represent a community consensus or recommendation, so users
and implementers are free to ignore Informational MERCs or follow their
advice.
3. A **Process** MERC describes a process surrounding Mayan EDMS, or
proposes a change to (or an event in) a process. Process MERCs are
like Feature MERCs but apply to areas other than the Mayan EDMS
framework itself. They may propose an implementation, but not to
Mayan EDMS's codebase; they often require community consensus; unlike
Informational MERCs, they are more than recommendations, and users
are typically not free to ignore them. Examples include
procedures, guidelines, changes to the decision-making process, and
changes to the tools or environment used in Mayan EDMS development.
Any meta-MERC is also considered a Process MERC. (So this document
is a Process MERC).
MERC submission workflow
========================
Pre-proposal
------------
The MERC process begins with a new idea for Mayan EDMS. It is highly recommended
that a single MERC contain a single key proposal or new idea. Small enhancements
or patches usually don't need a MERC and follow Mayan EDMS's normal contribution
process.
MERCs should be focused on a single topic. If in doubt, split your MERC
into several well-focused ones.
Once the idea's been vetted, a draft MERC should be presented to the
Mayan EDMS mailing list. This gives the author a chance to flesh out the
draft MERC to make sure it's properly formatted, of high quality, and to address
initial concerns about the proposal.
The Core Developers will be responsible for accepting or rejecting the MERC proposal.
Submitting the draft
--------------------
Following the discussion on Mayan EDMS mailing list, the proposal
should be sent as a merge request to the Mayan EDMS repository. The draft must
be written in MERC style; if it isn't the merge request may be rejected until proper
formatting rules are followed.
Implementation
--------------
Finally, once a MERC has been accepted, the implementation must be completed. In
many cases some (or all) implementation will actually happen during the MERC
process: Feature MERCs will often have fairly complete implementations before
being reviewed. When the implementation is complete and incorporated
into the main source code repository, the status will be changed to
"Final".
MERC format
===========
MERCs need to follow a common format and outline; this section describes
that format.
MERCs must be written in `reStructuredText <http://docutils.sourceforge.net/rst.html>`_
(the same format as Mayan EDMS's documentation).
Each MERC should have the following parts:
#. A short descriptive title (e.g. "User document filters"), which is also reflected
in the MERC's filename (e.g. ``0002-user-document-filters.rst``).
#. A preamble -- a rST `field list <http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html#field-lists>`_
containing metadata about the MERC, including the MERC number and so forth. See
`MERC Metadata`_ below for specific details.
#. Abstract -- a short (~200 word) description of the technical issue
being addressed.
#. Specification -- The technical specification should describe the syntax and
semantics of any new feature. The specification should be detailed enough to
allow implementation -- that is, developers other than the author should
(given the right experience) be able to independently implement the feature,
given only the MERC.
#. Motivation -- The motivation is critical for MERCs that want to add
substantial new features or materially refactor existing ones. It should
clearly explain why the existing solutions are inadequate to address the
problem that the MERC solves. MERC submissions without sufficient motivation
may be rejected outright.
#. Rationale -- The rationale fleshes out the specification by describing what
motivated the design and why particular design decisions were made. It
should describe alternate designs that were considered and related work.
The rationale should provide evidence of consensus within the community and
discuss important objections or concerns raised during discussion.
#. Backwards Compatibility -- All MERCs that introduce backwards
incompatibilities must include a section describing these incompatibilities
and their severity. The MERC must explain how the author proposes to deal
with these incompatibilities. MERC submissions without a sufficient backwards
compatibility treatise may be rejected outright.
#. Reference Implementation -- The reference implementation must be completed
before any MERC is given status "Final", but it need not be completed before
the MERC is accepted. While there is merit to the approach of reaching
consensus on the specification and rationale before writing code, the
principle of "rough consensus and running code" is still useful when it comes
to resolving many discussions of API details.
The final implementation must include tests and documentation, per Mayan EDMS
development guide.
MERC Metadata
-------------
Each MERC must begin with some metadata given as an rST
`field list <http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html#field-lists>`_.
The headers must contain the following fields:
``MERC``
The MERC number. In an initial merge request, this can be left out or given
as ``XXXX``; the reviewer who merges the pull request will assign the MERC
number.
``Type``
``Feature``, ``Informational``, or ``Process``
``Status``
``Draft``, ``Accepted``, ``Rejected``, ``Withdrawn``, ``Final``, or ``Superseded``
``Created``
Original creation date of the MERC (in ``yyyy-mm-dd`` format)
``Last-Modified``
Date the MERC was last modified (in ``yyyy-mm-dd`` format)
``Author``
The MERC's author(s).
``Implementation-Team``
The person/people who have committed to implementing this MERC
``Requires``
If this MERC depends on another MERC being implemented first,
this should be a link to the required MERC.
``Mayan EDMS-Version`` (optional)
For Feature MERCs, the version of Mayan EDMS (e.g. ``2.7.3``) that this
feature will be released in.
``Replaces`` and ``Superseded-By`` (optional)
These fields indicate that a MERC has been rendered obsolete. The newer MERC
must have a ``Replaces`` header containing the number of the MERC that it
rendered obsolete; the older MERC has a ``Superseded-By`` header pointing to
the newer MERC.
``Resolution`` (optional)
For MERCs that have been decided upon, this can be a link to the final
rationale for acceptance/rejection. It's also reasonable to simply update
the MERC with a "Resolution" section, in which case this header can be left
out.
Auxiliary Files
---------------
MERCs may include auxiliary files such as diagrams. Such files must be named
``XXXX-descriptive-title.ext``, where "XXXX" is the MERC number,
"descriptive-title" is a short slug indicating what the file contains, and
"ext" is replaced by the actual file extension (e.g. "png").
Reporting MERC Bugs, or Submitting MERC Updates
===============================================
How you report a bug, or submit a MERC update depends on several factors, such as
the maturity of the MERC, the preferences of the MERC author, and the nature of
your comments. For the early draft stages of the MERC, it's probably best to
send your comments and changes directly to the MERC author. For more mature, or
finished MERCs you can submit corrections as repository issues or merge requests
against the git repository.
When in doubt about where to send your changes, please check first with the MERC
author and/or a core developer.
MERC authors with git push privileges for the MERC repository can update the MERCs
themselves.

View File

@@ -0,0 +1,82 @@
====================
MERC 2: Test writing
====================
:MERC: 2
:Author: Michael Price
:Status: Accepted
:Type: Feature
:Created: 2018-02-22
:Last-Modified: 2018-04-01
.. contents:: Table of Contents
:depth: 3
:local:
Abstract
========
This MERC proposes a standard methodology for writing tests for Mayan EDMS.
Motivation
==========
Having a standard methodology for writing tests has the following advantages:
1. Scaffolding can be reduced by providing the most frequently used
paradigms as methods or helper functions.
2. Reduce the probabilities of errors slipping through poorly written tests.
Specification
=============
1. Tests must test each view in at least two ways:
A. Object creations views must be tested with and without permissions.
B. Object detail, list and delete views must be tested with and without
object access.
2. Tests must assert the status code of the response even
when the expected status is HTTP 200.
3. The actual request performed must be enclosed in a private methods
so that the fail and pass tests use the same HTTP request.
4. Test must verify that changes happened and didn't happened in the
database regardless of the return code. Even is an edit view returns
and error 4XX (404-Not found, 403-Forbidden, etc), the test must
ensure that the data was not indeed modified.
5. All tests must use the test user created by the BaseAPITestCase and not
an super user unless absolutely required by the test.
6. Each test must test just one thing.
7. If a test object needs to be created before the execution of a request
this object must be created by a private method.
Example:
.. code-block:: python
def _request_tag_create(self):
return self.post(
viewname='rest_api:tag-list', data={
'label': TEST_TAG_LABEL, 'color': TEST_TAG_COLOR
}
)
def test_tag_create_view_no_permission(self):
response = self._request_tag_create()
self.assertEqual(response.status_code, status.HTTP_403_FORBIDDEN)
self.assertEqual(Tag.objects.count(), 0)
def test_tag_create_view_with_permission(self):
self.grant_permission(permission=permission_tag_create)
response = self._request_tag_create()
self.assertEqual(response.status_code, status.HTTP_201_CREATED)
tag = Tag.objects.first()
self.assertEqual(response.data['id'], tag.pk)
self.assertEqual(response.data['label'], TEST_TAG_LABEL)
self.assertEqual(response.data['color'], TEST_TAG_COLOR)
self.assertEqual(Tag.objects.count(), 1)
self.assertEqual(tag.label, TEST_TAG_LABEL)
self.assertEqual(tag.color, TEST_TAG_COLOR)

View File

@@ -0,0 +1,74 @@
==================================
MERC 3: Using JavaScript libraries
==================================
:MERC: 3
:Author: Eric Riggs
:Status: Accepted
:Type: Feature
:Created: 2018-03-08
:Last-Modified: 2018-06-04
.. contents:: Table of Contents
:depth: 3
:local:
Abstract
========
This MERC proposes a standard way to use JavaScript libraries.
Rationale
=========
Mayan EDMS uses several JavaScript libraries for user interface features.
Currently, the libraries are not installed using any JavaScript package
manager but copied uncompressed. Installing the libraries in this manner
carries some disadvantages.
Motivation
==========
The inclusion of the libraries in source form is required by many licenses
if the library is not installed by a package manager in distributable form.
There are several disadvantages with the current approach:
1. Having the library in source form means that the entire weight of the
library's size carries over the overall size of the Mayan EDMS distribution files.
The justification for not doing this is the same as with the Python libraries
which are not copied with the code but downloaded upon installation.
2. Upgrading the libraries means manually examining the version of the
installed in the project and manually searching, downloading, compressing
and adding the files to the repository.
3. The source form of the libraries includes normal and minified versions
of the code and the accompanying CSS files. There is no define preference
and through the project both versions of the libraries are loaded
interchangeably. Using a packager manager the minified version would be
used of a pipeline to minify the installed libraries should be added.
Backwards Compatibility
=======================
There are no backwards compatibility issues with this proposal.
Specification
=============
Changes needed:
1. Python based JavaScript package manager. Alternatively a Python wrapper
for a JavaScript package manager could be used.
2. Package manifest for the JavaScript libraries used.
3. Installation pipeline to install the JavaScript libraries during the
installation and setup of the project.
References:
- https://github.com/JDeuce/powser
- https://github.com/javrasya/version-manager
- https://github.com/inveniosoftware-attic/setuptools-bower
- https://pypi.python.org/pypi/django-bower-cache/0.5.0
- http://django-pipeline.readthedocs.io/en/latest/index.html
- https://github.com/nvbn/django-bower

View File

@@ -0,0 +1,46 @@
=====================
MERC 4: Support forum
=====================
:MERC: 4
:Author: Michael Price
:Status: Accepted
:Type: Process
:Created: 2018-02-27
:Last-Modified: 2018-09-04
.. contents:: Table of Contents
:depth: 3
:local:
Abstract
========
This MERC proposes the move of the official community meeting place
from Google Group to a self hosted forum platform.
Motivation
==========
Google Groups is not a proper forum platform and as such is lacking many
features that would increase participation. Google Groups has not had any
significant update in years and the age of the platform is visible. There
are no official mobile apps for Google Groups, no responsible template
is not provided. There are not integration options. These factors
contribute to the problems of knowledge dilution and one time
participation being experienced in the Mayan EDMS community.
Other concerns for moving the community to a self hosted forum solution
are that Google Groups presents a single point of failure by relying on
a free product hosted by a commercial company with no continuation plan
for the product. Google Groups doesn't provide archiving features and
the current archive solution relies on other third party services, one
of which (GMANE) has stopped working. Recent user privacy and censorship
issues regarding Google, reinforce the need for a self hosted solution.
Specification
=============
Platform chosen was phpBB. Factors were: written in PHP, ease of installation,
compatible with several database managers, mature, extensive development history.

View File

@@ -0,0 +1,149 @@
==========================
MERC 5: Explicit arguments
==========================
:MERC: 5
:Author: Roberto Rosario
:Status: Accepted
:Type: Feature
:Created: 2018-12-30
:Last-Modified: 2018-12-31
.. contents:: Table of Contents
:depth: 3
:local:
Abstract
========
This MERC proposes the adoption of a new methodology when performing calls.
It seeks to reduce the use of positional arguments in favor of keyword
arguments in as many places as possible.
Motivation
==========
As the project grows, legibility of code becomes more important. Keyword
argument help document the use of services, clases and functions. Refactors
that affect the interface of services are also easier to find and update and
fix. Positional argument can cause a call to continue working as long as the
datatype of the argument remains the same. Usage of keyword arguments will
automatically raise and error that will prevent such situations. Keyword
argument further eliminate the relevance of position or the arguments, and
the arguments can be sorted alphabetically for easier visual scanning or by
semantic significance improving code readability.
Specification
=============
Adoption of this MERC will require an audit of existing calls and the use
of the method proposed for new calls. Every call regardless of the type or
origin of the source callable will name each argument used. By type it is
meant: classes, functions, methods. Origin means: local from the project,
from the framework, third party libraries or the standard library.
Backwards Compatibility
=======================
No backwards compatibility issues are expected. New errors arising from the use
if keyword arguments could be interpreted as existing latent issues that
have not been uncovered.
Reference Implementation
========================
Example:
Before:
.. code-block:: python
from mayan.apps.common.classes import Template
Template(
'menu_main', 'appearance/menu_main.html'
)
After:
.. code-block:: python
from mayan.apps.common.classes import Template
Template(
name='menu_main', template_name='appearance/menu_main.html'
)
When calls use a mixture or positional and keyword arguments, the keywords
arguments can only be found after the positional arguments. Complete use
of keyword arguments allow the reposition of arguments for semantic
purposes.
Example:
Before:
.. code-block:: python
from django.conf.urls import url
from .views import AboutView, HomeView, RootView
urlpatterns = [
url(r'^$', RootView.as_view(), name='root'),
url(r'^home/$', HomeView.as_view(), name='home'),
url(r'^about/$', AboutView.as_view(), name='about_view'),
]
After:
.. code-block:: python
from django.conf.urls import url
from .views import AboutView, HomeView, RootView
urlpatterns = [
url(regex=r'^$', name='root', view=RootView.as_view()),
url(regex=r'^home/$', name='home', view=HomeView.as_view()),
url(regex=r'^about/$', name='about_view', view=AboutView.as_view()),
]
Keyword arguments should also be used for callables that pass those to others
down the line like Django's ``reverse`` function. Any change to the name of
the ``pk`` URL parameter will raise an exception in this code alerting to
any posible incompatible use.
Example:
.. code-block:: python
def get_absolute_url(self):
return reverse(
viewname='documents:document_preview', kwargs={'pk': self.pk}
)
This becomes even more important when multiple URL parameters are used. Since
the API documentation is auto generated from the code itself, it would make
sense to rename the first URL parameter from ``pk`` to ``document_pk``. Such
change will cause all address to view resolutions to break forcing their
update and allowing all consumers' interface usage to remain synchonized to the
callable's interface.
.. code-block:: python
url(
regex=r'^documents/(?P<pk>[0-9]+)/versions/(?P<document_version_pk>[0-9]+)/pages/(?P<document_page_pk>[0-9]+)/image/$',
name='documentpage-image', view=APIDocumentPageImageView.as_view()
),

View File

@@ -0,0 +1,81 @@
==================================
MERC 6: Lower information disclose
==================================
:MERC: 6
:Author: Michael Price
:Status: Accepted
:Type: Feature
:Created: 2018-12-30
:Last-Modified: 2018-12-31
.. contents:: Table of Contents
:depth: 3
:local:
Abstract
========
This MERC proposes the use of errors that don't disclose the existance of a
resource in the event that the requester doesn't have the required credentials.
Motivation
==========
When an user tries to perform an action like opening a view to a document for
which the required permission is missing, a permission required or access
denied error is presented. This is semantically correct, but from the stand
point of security it is still failing because it is letting the user know
that such document exists in the first place. This MERC proposes changing the
error message for existing resource to one that doesn't divulge any information
to unauthorized parties, like "Not Found".
Specification
=============
Out of the 4 basic CRUD operations, Read, Update and Delete should return an
HTTP 404 error instead of an HTTP 403 error. Only the Create operation will
continue returning the current HTTP 403 error, unless it is creating a
new resource that is related to an existing resource.
Since most view use the internal custom CRUD classes making a change to the
``ObjectPermissionCheckMixin`` class to raise an HTTP 404 on object access
failure will fulfill the proposal of this MERC.
Adding the ``object_permission_raise_404`` class attribute and setting it
to default to False will allow fulfullin the goal of this MERC while
keeping the existing functionality intact.
Example:
.. code-block:: python
class ObjectPermissionCheckMixin(object):
"""
If object_permission_raise_404 is True an HTTP 404 error will be raised
instead of the normal 403.
"""
object_permission = None
object_permission_raise_404 = False
def get_permission_object(self):
return self.get_object()
def dispatch(self, request, *args, **kwargs):
if self.object_permission:
try:
AccessControlList.objects.check_access(
permissions=self.object_permission, user=request.user,
obj=self.get_permission_object(),
related=getattr(self, 'object_permission_related', None)
)
except PermissionDenied:
if self.object_permission_raise_404:
raise Http404
else:
raise
return super(
ObjectPermissionCheckMixin, self
).dispatch(request, *args, **kwargs)

55
docs/mercs/index.rst Normal file
View File

@@ -0,0 +1,55 @@
*****
MECRs
*****
Mayan EDMS Request For Comment documents index.
.. contents:: Table of Contents
:depth: 2
:local:
Status
======
Accepted
--------
.. toctree::
:maxdepth: 1
../mercs/0001-merc-process
../mercs/0002-test-writing
../mercs/0003-using-javascript-libraries
../mercs/0005-explicit-arguments
../mercs/0006-lower-information-disclose
Draft
-----
.. toctree::
:maxdepth: 1
../mercs/merging-roles-and-groups
Type
====
Process
-------
.. toctree::
:maxdepth: 1
../mercs/0001-merc-process
../mercs/0004-support-forum
Feature
-------
.. toctree::
:maxdepth: 1
../mercs/0002-test-writing
../mercs/0003-using-javascript-libraries
../mercs/0005-explicit-arguments
../mercs/0006-lower-information-disclose

View File

@@ -0,0 +1,67 @@
===============================
MERC XX: Unify Roles and Groups
===============================
:MERC: XX
:Author: Michael Price
:Status: Draft
:Type: Feature
:Created: 2018-02-27
:Last-Modified: 2018-02-27
.. contents:: Table of Contents
:depth: 3
:local:
Abstract
========
This MERC proposes the merging of the Roles and Group models.
Rationale
=========
Mayan EDMS uses Groups as units of users that are meant to mirror an
organization's actual user hierarchy. Roles are used as permission units.
Separation of concerns is a concept Mayan EDMS executes very successfully
but when it comes to the Roles/Groups relationship that execution causes
overheads without providing advantages in the day to day operations.
In reality there is almost a 1 to 1 correlation between Roles and Groups.
Other permissions systems already use Groups as permission units without
disadvantages. An example of this is LDAP and its commercial counterpart
Active Directory.
Motivation
==========
Merging the Role and Group model will reduce some complexity when initially
setting up Mayan EDMS. The merge allows removing a Mayan EDMS model in
favor of using a native Django model for the same task.
Merging the Role and Group models will also provide a speed boost in every
permission check and queryset filtering. These checks are nested in nature.
Since the access checks are performed for every view and for every link
in the view the performance gain should be substantial.
Backwards Compatibility
=======================
To avoid loss of role configuration a data migration will be needed to
convert existing roles to groups.
Specification
=============
Changes needed:
1. Data migration to convert existing roles to groups.
2. Prepend or append an identifier to the migrated roles.
3. Intermediate model to map permissions to a group. This will substitute
the Role model's permissions many to many field.
4. Update the ``AccessControlList`` models roles field to point to the group
models.
5. Update the role checks in the ``check_access`` and ``restrict_queryset``
``AccessControlList`` model manager methods.

View File

@@ -41,11 +41,11 @@ Version 0.10
* Small change in the scheduler that increases stability.
* Russian translation updates Sergey Glita
* Improved and generalized the OCR queue locking mechanism, this should
eliminate any posibility of race conditions between Mayan EDMS OCR nodes.
eliminate any possibility of race conditions between Mayan EDMS OCR nodes.
* Added support for signals to the OCR queue, this results in instant OCR
processing upon submittal of a document to the OCR queue, this works in
addition to the current polling processing which eliminates the
posibility of stale documents in the OCR queue.
possibility of stale documents in the OCR queue.
* Added multiple document OCR submit link
* Re enabled tesseract language specific OCR processing and added a one
* Re enabled Tesseract language specific OCR processing and added a one
(1) time language neutral retry for failed language specific OCR

View File

@@ -1,13 +1,12 @@
================================
Mayan EDMS v0.12.1 release notes
================================
Version 0.12.1
==============
*May 2012*
This is the first maintenance release of the 0.12 series.
Overview
========
--------
While bug fixes and minor feature were the focus for this release, some
bigger changes were included because of their importance. The parsing of
@@ -19,11 +18,12 @@ environments where users don't have the ability to install OS level
binaries.
What's new in Mayan EDMS v0.12.1
================================
Changes
-------
Fabric file (fabfile)
~~~~~~~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^^^^^^^
A Fabric file is included to help users not very familiar with Ubuntu,
Python and Django install Mayan EDMS, or for system administrators
looking to automate the install whether in local or remote systems.
@@ -33,54 +33,66 @@ Feel free to submit your configuration settings and files for different database
webserver or Linux distribution. More configurations will be added to
the fabfile as more are tested.
Documentation update
~~~~~~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^^^^^^
The installation instructions were updated to include the installation of
the libpng-dev and libjpeg-dev libraries as well as the installation of
the poppler-utils package. An additional step to help users test their
the ``poppler-utils`` package. An additional step to help users test their
new installation of Mayan EDMS was also added.
Translations
~~~~~~~~~~~~
^^^^^^^^^^^^
The Italian translation has been synchronized with the source files at
Transifex and finished to %100 completion.
Usability improvements
~~~~~~~~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^^^^^^^^
The index instance view now feature the same multi document action
buttons (Submit to OCR, delete, download, etc) as the mail and recent
document views.
Better office document conversion
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
A new method of converting office documents has been implemented, this
new method doesn't require the use of the command line utility ``UNOCONV``.
If this new method proves to work better than previous solutions the use
of ``UNOCONV`` may be deprecated in the future. The conversion method
adds just one new configuration option: `CONVERTER_LIBREOFFICE_PATH`
which defaults to '/usr/bin/libreoffice'.
adds just one new configuration option: ``CONVERTER_LIBREOFFICE_PATH``
which defaults to ``/usr/bin/libreoffice``.
Better PDF text parsing
~~~~~~~~~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^^^^^^^^^
Brian E. submitted a patch to use the Poppler package pdftotext utility to
extract text from PDF files. This is now the default method Mayan EDMS
will execute to try to extract text from a PDF and failing that will
fallback to the previous method. This change add a new configuration
option: `OCR_PDFTOTEXT_PATH` to specify the location of the ``pdftotext``
executable, it defaults to '/usr/bin/pdftotext'. Be sure to install the
option: ``OCR_PDFTOTEXT_PATH`` to specify the location of the ``pdftotext``
executable, it defaults to ``/usr/bin/pdftotext``. Be sure to install the
``poppler-utils`` os package to take advantage of this new parser.
Changed defaults
~~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^^
The OCR queue is now active by default when first created during the
``syncdb`` phase and the `OCR_AUTOMATIC_OCR` option now defaults
``syncdb`` phase and the ``OCR_AUTOMATIC_OCR`` option now defaults
to ``True``. These two changes are made to reduce the steps required for
new users to start enjoying the benefits of automatic text extraction from
uploaded documents without having to read the documentation and have a more
functional default install.
Upgrading from a previous version
=================================
---------------------------------
Start off by adding the new requirements::
@@ -104,13 +116,17 @@ The upgrade procedure is now complete.
Backward incompatible changes
=============================
-----------------------------
* None
Bugs fixed
==========
* Issue #25 "Office document conversion error"
----------
:github-issue:`25` "Office document conversion error"
Removals
--------
Stuff removed
=============
* None

View File

@@ -1,14 +1,12 @@
================================
Mayan EDMS v0.12.2 release notes
================================
Version 0.12.2
==============
*June 2012*
This is the second maintenance release of the 0.12 series.
Overview
========
--------
As with the previous release bug fixes and minor feature were the focus
for this release too. `issue #24`_ has been fixed and document
@@ -19,24 +17,28 @@ the diagnosis of installation of runtime error a simple view showing the
number of internal interval jobs being used by Mayan EDMS as well as a
new app which shows a detail of the current installation enviroment were added.
What's new in Mayan EDMS v0.12.2
================================
Changes
-------
Smarter auto admin creation
~~~~~~~~~~~~~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^^^^^^^^^^^^^
Mayan EDMS creates a administrator user during the
database creation phase to reduce the amount of steps required for a
functional install. The creation of this account is controlled by the configuration
option `COMMON_AUTO_CREATE_ADMIN`, the username of the account is
specified with the configuration option `COMMON_AUTO_ADMIN_USERNAME`
and the password of this account by the option `COMMON_AUTO_ADMIN_PASSWORD`.
Previously the `COMMON_AUTO_ADMIN_PASSWORD` defaulted to 'admin' which
option ``COMMON_AUTO_CREATE_ADMIN``, the username of the account is
specified with the configuration option ``COMMON_AUTO_ADMIN_USERNAME``
and the password of this account by the option ``COMMON_AUTO_ADMIN_PASSWORD``.
Previously the ``COMMON_AUTO_ADMIN_PASSWORD`` defaulted to 'admin' which
created an administrator account of username 'admin' with a password of
'admin'. The new default is to randomize an initial password and show this password
at the login screen until the administrator password is changed.
Document check outs
~~~~~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^^^^^
As per the feature request filed under `issue #26`_, a new document
check out and check in functionality has been added. Users can now
check out a document and lock new version of it from being uploaded to avoid
@@ -47,8 +49,10 @@ new versions of it or check the document back in before the expiration period,
unless being granted the ``Allow overriding check out restrictions`` or
``Forcefully check in documents`` permission respectively.
Installation environment app
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Diagnosting remote installations of web based applications without access to the
command line can be a bit hard, to alleviate this situation a new installation
environment details app has been added. The purpose of this app is to provide
@@ -56,19 +60,25 @@ support staff information about the physical environment where Mayan EDMS has
been installed. To avoid possible security compromises only administrators
can access this app.
Editable compressed documents filename
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Previously when downloading more than one document in a compressed manner,
Mayan EDMS would produce a file with the name ``document_bundle.zip`` for
download. A different filename can now be specified at the same download dialog.
German translation
~~~~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^^^^
A German language translation has been added thanks to Tetja Rediske
and Tilmann Sittig.
Statistics gathering
~~~~~~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^^^^^^
Previous attempts at gathering usage statistics have been met with deficient results.
User participation in surveys as well as the quality of the data entered by users
was disappointing. That is why this version of Mayan EDMS features an
@@ -76,7 +86,7 @@ anonymous statistics gathering functionality.
Upgrading from a previous version
=================================
---------------------------------
Start off by adding the new requirements::
@@ -97,19 +107,22 @@ The upgrade procedure is now complete.
Backward incompatible changes
=============================
-----------------------------
* None
Bugs fixed
==========
* `issue #24`_ "Duplicated filename extension when uploading a new version of a document"
* `issue #26`_ "checkout feature request"
----------
:github-issue:`24 "Duplicated filename extension when uploading a new version of a document"
:github-issue:`26` "checkout feature request"
Removals
--------
Stuff removed
=============
* Feedback app
.. _issue #24: https://github.com/rosarior/mayan/issues/24
.. _issue #26: https://github.com/rosarior/mayan/issues/26

View File

@@ -1,15 +1,12 @@
==============================
Mayan EDMS v0.12 release notes
==============================
Version 0.12
============
*February 2012*
Welcome to Mayan EDMS v0.12!
This release commemorates Mayan EDMS first aniversary!
Overview
========
--------
Aside from new features, the focus of this release of Mayan EDMS also
been about improving the code and documentation quality standard
@@ -26,7 +23,7 @@ releases:
* All app permissions have been move to a separate permissions.py file
per app
* Complete permission system refactor.
* Document signining code move to it's own app
* Document signing code moved to it's own app
* Initial unit tests
* A lot of logging used throught the entire project.
* Much functionality moved to model managers.
@@ -38,16 +35,17 @@ releases:
* Removal of remarked code.
What's new in Mayan EDMS v0.12
==============================
Changes
-------
ACL support
~~~~~~~~~~~
^^^^^^^^^^^
* Object level access control is now in place for documents, folders,
tags and smart links. What this means is that administrators can now
grant permissions to users, groups or roles on for specific objects.
A more in-depth explanation of how this new ACL system can be found in
the :doc:`3 tier access control <../topics/permissions>` section of the
the :doc:`3 tier access control <../chapters/permissions>` section of the
permissions chapter.
* Default class ACL support. Administrators can setup the access control
@@ -57,57 +55,72 @@ ACL support
allow the access control list that the actual creator of an object will
inherit.
Anonymous user support
~~~~~~~~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^^^^^^^^
Anonymous user support is a two tier function, first is the addition of
the `COMMON_ALLOW_ANONYMOUS_ACCESS` configuration option that
allows non authenticated user to browse all the pages of a Mayan EDMS installation.
The second part of this support is the ability to assign permissions
or individual access to objects to anonymous users.
the ``COMMON_ALLOW_ANONYMOUS_ACCESS`` configuration option that
allows non authenticated user to browse all the pages of a Mayan EDMS
installation. The second part of this support is the ability to assign
permissions or individual access to objects to anonymous users.
Translations
~~~~~~~~~~~~~~~~~~~
^^^^^^^^^^^^
A new Italian translation is available, provided by SeeOpen.IT
(www.seeopen.it, info@seeopen.it) as well as complete Russian translation
update by Sergei Glita. Included in this release also the initial translation
to Polish by mic.
Usability improvements
~~~~~~~~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^^^^^^^^
* Detached signature behavior improved, uploading a new detached signature
erases the previous one.
* Usability improvement in the role member's add/removal form, by using
HTML's option groups tag property
2 Step download process
~~~~~~~~~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^^^^^^^^^
The code for downloading single and multiple document and document versions
has been merged with compression support also added. This allows for the
download of documents in their original format or compressed and well as
the download of several documents in a single compressed file.
Customizable GPG home directory
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Addition of the `SIGNATURES_GPG_HOME` configuration option to let
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Addition of the ``SIGNATURES_GPG_HOME`` configuration option to let
administrators set Mayan EDMS's GPG instance home directory, used to
store keyrings and other GPG configuration files.
Out of process bulk uploading
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
A management command has been added to help upload a large number of documents
from a compressed file. For information about this new feature check the Initial data loading chapter.
from a compressed file. For information about this new feature check the
Initial data loading chapter.
Out of process user import
~~~~~~~~~~~~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^^^^^^^^^^^^
A management command has been added to import a large number users
from a CSV file. More information about this new feature can also be found
in the Initial data loading chapter.
Refactored document indexing
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:doc:`The document indexing <../topics/indexes>` functionality has been
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
:doc:`The document indexing <../chapters/indexes>` functionality has been
improved and moved from experimental
stage to beta stage. Index configuration menus are now available on the
``Setup`` menu and allows administrators to create skeleton trees that will
@@ -116,12 +129,14 @@ These populated trees can also be mirrored on the physical filesystem and shared
using Samba or another filesharing server giving users a structured view
of the documents contained within Mayan EDMS from the ``Indexes`` tab
or from a mirrored index shared via the network. A new configuration option
has been added, `DOCUMENT_INDEXING_FILESYSTEM_SERVING`, which maps
has been added, ``DOCUMENT_INDEXING_FILESYSTEM_SERVING``, which maps
the index internal name with the physical directory where such index will be
mirrored on disk.
Help shape Mayan EDMS's future
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Included in this version is a small feedback application, found under the
``About`` main menu, where users by just answering some questions can
help determine the priority of the next planned features on the pipeline,
@@ -129,8 +144,10 @@ or even help add new features if enough requests are received. All questions
are optional but answering as many as possible will help greatly understand
the need of the Mayan EDMS user base.
Staging file previews
~~~~~~~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^^^^^^^
The staging file previews now show the filename for easier
identification and speedier upload selection. The staging files previews
are now treated as a gallery which means that users can preview an entire
@@ -138,8 +155,23 @@ page of staging files without having to click and close each one
individually.
Removals
--------
* Support for Celery and Sentry has been drop
for now.
* Removed the 'db_index' argument from Text fields definition and
migrations as it was causing error messages for MySQL users, thanks to
Sergei Glita for reporting this one.
* Configuration options removed:
* OCR_CACHE_URI
* DOCUMENT_INDEXING_FILESYSTEM_FILESERVING_PATH - Use the newest `DOCUMENT_INDEXING_FILESYSTEM_SERVING`
* DOCUMENT_INDEXING_FILESYSTEM_FILESERVING_ENABLE - Use the newest `DOCUMENT_INDEXING_FILESYSTEM_SERVING`
Upgrading from a previous version
=================================
---------------------------------
Start off by adding the new requirements::
@@ -201,31 +233,20 @@ The upgrade procedure is now complete.
Backward incompatible changes
=============================
-----------------------------
The permission system has been completely reworked so sadly this is a
place where even data migration can't help and the permissions assigned
to roles will be lost during the upgrade to version 0.12. Users, groups
to roles will be lost during the upgrade to version 0.12. Users, groups
and roles will be preserved only permissions need to be assigned again,
so write down your role permission setup before upgrading.
Bugs fixed
==========
* Issue #17, special thanks to Dave Herring for all the help including
access to a machine suffering with the issue, and to Sergei Glita for
his research and eventual find of the core cause.
----------
* :github-issue:`17` special thanks to Dave Herring for all the help including
access to a machine suffering with the issue, and to Sergei Glita for
his research and eventual find of the core cause.
* Statistics fixes.
* Fixed get_image_cache_name regression in the OCR app.
Stuff removed
=============
* Support for Celery and Sentry has been drop
for now.
* Removed the 'db_index' argument from Text fields definition and
migrations as it was causing error messages for MySQL users, thanks to
Sergei Glita for reporting this one.
* Configuration options removed:
* OCR_CACHE_URI
* DOCUMENT_INDEXING_FILESYSTEM_FILESERVING_PATH - Use the newest `DOCUMENT_INDEXING_FILESYSTEM_SERVING`
* DOCUMENT_INDEXING_FILESYSTEM_FILESERVING_ENABLE - Use the newest `DOCUMENT_INDEXING_FILESYSTEM_SERVING`

View File

@@ -1,110 +1,132 @@
================================
Mayan EDMS v0.13 release notes
================================
Version 0.13
============
*December 2012*
Welcome to Mayan EDMS v0.13!
Overview
========
--------
Initially this version was meant as a the third maintenance release of
the 0.12 series, but with the amount of changes and updates that were included
it was obvious this was not just a bug fix version anymore hence the version
jump to 0.13 instead of 0.12.3
What's new in Mayan EDMS v0.13
================================
Changes
-------
Django 1.3.5
~~~~~~~~~~~~
^^^^^^^^^^^^
This release updates the required version of Django to 1.3.5 to take advantage
of the security fixes added to that version of the framework.
Bulk document tagging and untagging
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
As requested by issue `issue #31`_ this feature has been implemented and enabled in this version.
Attaching or removing tags from a large number of documents is now much easier.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
As requested by issue `issue #31`_ this feature has been implemented and
enabled in this version. Attaching or removing tags from a large number of
documents is now much easier.
Registration
~~~~~~~~~~~~
Based on requests made by the community for greater commercial support and services for
Mayan EDMS, a new feature has been added that allows users to register their
copies of Mayan EDMS and better help users with commercial support packages.
Registration for non commercial users is voluntary and optional, and in no way
affects the functionality of Mayan EDMS. However even for non commercial users
registration offers the advantage of automatically branding the user's copy
of Mayan EDMS with their name or the company name in the title area.
^^^^^^^^^^^^
Based on requests made by the community for greater commercial support and
services for Mayan EDMS, a new feature has been added that allows users
register their copies of Mayan EDMS and better help users with commercial
support packages. Registration for non commercial users is voluntary and
optional, and in no way affects the functionality of Mayan EDMS. However
even for non commercial users registration offers the advantage of
automatically branding the user's copy of Mayan EDMS with their name or the
company name in the title area.
Per document type indexing
~~~~~~~~~~~~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^^^^^^^^^^^^
Index can now be restricted to update only on specific document types, this
greatly increases the usefulness of indexes, and prevents unwanted index
updates.
Bootstrap
~~~~~~~~~
^^^^^^^^^
Setting up Mayan EDMS after installation has been indetified by users as the
main difficulty when knowledge about Mayan EDMS is relatively low. To
main difficulty when knowledge about Mayan EDMS is relatively low. To
address this situation a new feature that provides preconfigured setups has been
added. These preconfigured setups are published in the Mayan EDMS website and
added. These preconfigured setups are published in the Mayan EDMS website and
upon synchonization are available to users, this gives users access and integrators
access to new setups without having to wait for new versions of Mayan EDMS.
Aside from including preconfigured setups, the new bootstrap app
has the ability of dumping an user's current setup into a serialized text file
which can be tweaked by hand and sent via email to other users. The possibilities
which can be tweaked by hand and sent via email to other users. The possibilities
enabled by this range from company wide defaults setups to consultants providing
their clients with customized setups without having to access their clients'
Mayan EDMS instances. ``JSON``, ``YAML`` and a custom ``YAML`` format
(http://djangosnippets.org/snippets/2461/) are supported by this new app.
Add documents to folders in bulk
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
As requested, the ability to add more than one document at a time to a selected
folder has been added.
Translation updates
~~~~~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^^^^^
The translation for all the current languages were synchronized to the
latest transifex project sources.
Model updates
~~~~~~~~~~~~~
^^^^^^^^^^^^^
Several small fixes to the behavior of some model were added, namely that
the names of some models should be unique. The document type name as well
as the metadata set name were two models that were updated to behave this way.
Navigation updates
~~~~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^^^^
There were some additions and changes to the navigation to make it more intuitive
or to add an alternate way to access the same information better. The bulk
attachment of tags was one of these. Previously users were added or removed from groups,
now users can be assigned to groups without leaving the user view. The name of an
existing metadata set can now be edited and what was previously called metadata set edit
is now more aptly named metadata members which adds or removes metadata types into a
single organizational unit. An error that caused a duplicate menu link in the
document type filename view was also fixed.
or to add an alternate way to access the same information better. The bulk
attachment of tags was one of these. Previously users were added or removed
from groups, now users can be assigned to groups without leaving the user view.
The name of an existing metadata set can now be edited and what was previously
called metadata set edit is now more aptly named metadata members which adds
or removes metadata types into a single organizational unit. An error that
caused a duplicate menu link in the document type filename view was also fixed.
Support for UNOCONV dropped
~~~~~~~~~~~~~~~~~~~~~~~~~~~
Support for converting office documents by calling LibreOffice via UNOCONV
^^^^^^^^^^^^^^^^^^^^^^^^^^^
Support for converting office documents by calling LibreOffice via ``UNOCONV``
has been disabled for a while ever since LibreOffice start including
document conversion support from the command line. This version completly
removes any traces of code and configuration options related to UNOCONV.
removes any traces of code and configuration options related to ``UNOCONV``.
Optimizations
~~~~~~~~~~~~~
Inspired by the idea of getting Mayan EDMS running effectively on low power hardware such as
the Raspberry Pi, several rounds or profiling and optimization were done.
^^^^^^^^^^^^^
Inspired by the idea of getting Mayan EDMS running effectively on low power
hardware such as the Raspberry Pi, several rounds or profiling and
optimization were done.
Some caching optimization were introduced to the permission model, resulting in
a speed increase of 33% in rendering time on views with heavy permission checking
and a 18% query reduction on cache hits.
Upgrading from a previous version
=================================
---------------------------------
If you installed Mayan EDMS by cloning the Git repository issue the commands::
$ git reset --hard HEAD
@@ -133,21 +155,24 @@ The upgrade procedure is now complete.
Backward incompatible changes
=============================
-----------------------------
* None
Bugs fixed or issues closed
===========================
* `issue #28`_ "Document indexing based on filesystem problem"
* `issue #29`_ Default ACL documentation
* `issue #30`_ "Ubuntu 12.0.4 LTS complaining about mising 'fabfile/templates/settings_local.py' (master branch)"
* `issue #31`_ "Bulk add tags Feature request"
* `issue #32`_ "Error run $python manage.py syncdb"
* `issue #33`_ "Fetches translations from Transifex. "
* `issue #34`_ "Initial syncdb fails because of import time database access"
* `issue #35`_ "Fix first install syncdb on Postgres"
* `issue #37`_ "When 19 >= &document_type_id >= 10 in url, error page not found"
* `issue #39`_ Feature request "Bulk move folders"
---------------------------
* :github-issue:`28` "Document indexing based on filesystem problem"
* :github-issue:`29` Default ACL documentation
* :github-issue:`30` "Ubuntu 12.0.4 LTS complaining about mising 'fabfile/templates/settings_local.py' (master branch)"
* :github-issue:`31` "Bulk add tags Feature request"
* :github-issue:`32` "Error run $python manage.py syncdb"
* :github-issue:`33` "Fetches translations from Transifex. "
* :github-issue:`34` "Initial syncdb fails because of import time database access"
* :github-issue:`35` "Fix first install syncdb on Postgres"
* :github-issue:`37` "When 19 >= &document_type_id >= 10 in url, error page not found"
* :github-issue:`39` * `issue #39`_ Feature request "Bulk move folders"
.. _issue #28: https://github.com/rosarior/mayan/issues/28

View File

@@ -1,13 +1,10 @@
=============================
Mayan EDMS v1.0 release notes
=============================
Version 1.0
===========
*August 26, 2014*
Welcome to Mayan EDMS v1.0!
Overview
========
--------
After a year of low activity the focus of this release was to get the code
updated to work with the most recent version of Django and the most recent
version of the dependencies Mayan EDMS uses. The goal was to have a strong
@@ -16,25 +13,30 @@ fixes were the primary focus of this cycle. Because of this not much
emphasis was placed on adding new features, or at least new features
that could have the potential to break things.
What's new in Mayan EDMS v1.0
=============================
Changes
-------
New home
~~~~~~~~
^^^^^^^^
The growth and reach of the project has necessitaded for a while the move
of the project to its own organization in Github. This move has finally been
done, the new URL of the project is: https://github.com/mayan-edms/mayan-edms
Django 1.6
~~~~~~~~~~
^^^^^^^^^^
This release updates the required version of Django to 1.6, bringing with it
not only new features, but also a lot of security updates, a new project
directory structure and new deployment methods.
Translation updates
~~~~~~~~~~~~~~~~~~~
The translation for all languages were synchronized to the latest transifex project sources.
Translation completion as reported by Transifex:
^^^^^^^^^^^^^^^^^^^
The translation for all languages were synchronized to the latest transifex
project sources. Translation completion as reported by Transifex:
* English - 100%
* Spanish - 100%
@@ -59,96 +61,127 @@ Translation completion as reported by Transifex:
* Croatian - 3%
* Turkish - 3%
Model updates
~~~~~~~~~~~~~
^^^^^^^^^^^^^
There were some convenience properties created to allow quick access to
a document's version and pages. These custom properties were removed and
an official method to access these properties as provided by Django is now
used.
Source code improvements
~~~~~~~~~~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^^^^^^^^^^
A circular import of metadata and document_index apps code from the documents app
was removed. Document index updates are now handled via signals, not called
directly as before. Hundreds of PEP8 style fixes, unused import removals,
unused variables removals and removal of remarked or unused code. Removal of the
DEVELOPMENT flag (was used to trigger static media serving during development),
this is now handled by the DEBUG flag. The DEBUG flag is now set to `True` by
``DEVELOPMENT`` flag (was used to trigger static media serving during development),
this is now handled by the ``DEBUG`` flag. The ``DEBUG`` flag is now set to ``True`` by
default as per Django 1.6 defaults. Removed usage of Django's JSON libraries
using Python's JSON library instead. Update of time and date use to use Django's
new timezone aware data and time handling. Removal of custom code in favor of using
modules provided by Django or by existing 3rd party libraries. Unification of code
used for equal or similar purpose in various modules.
Removal of included 3rd party modules
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
One last 3rd party module was included with the source code of Mayan EDMS.
This module is now available on PyPI and fetched during the installation instead
of being included.
Automatic testing and code coverage check
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Some initial tests were added, which will help with the detection of
regressions or bugs when adding new features. More tests are needed, but
the initial work has being started.
Update of required modules and libraries versions
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Many of the required modules and libraries have been updated to a more
recent version if not to their most recent released version.
Database connection leaks
~~~~~~~~~~~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^^^^^^^^^^^
Stale database connection being left open by scheduler tasks are now explictly
closed. This avoids consumption of the pool of database connections, increases
stability and reduces memory usage.
Deletion of detached signatures
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Detached signatures can now be deleted, if accidentally added to the wrong document.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Detached signatures can now be deleted, if accidentally added to the wrong
document.
Removal of fabric based installations
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
These files are now part of their own project and located at https://github.com/mayan-edms/mayan-fabric
Pluggable OCR backends
~~~~~~~~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^^^^^^^^
A commonly requested feature, it is now possible to write backends drivers
to do document OCR using software or services other than Tesseract.
OCR improvements
~~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^^
OCR queue state is now reset when reloading Mayan EMDS, avoiding the OCR queue
to remain locked. `unpaper` binary is now an optional pre OCR requirement, the OCR
queue will now continue working is `unpaper` is not installed. Addition of post
queue will now continue working is ``unpaper`` is not installed. Addition of post
OCR processing support for French and German.
License change
~~~~~~~~~~~~~~
^^^^^^^^^^^^^^
Mayan EDMS is now licensed under the Apache 2.0 license. This means many
things but the main change is that inclusion of Mayan EDMS into
commercial products is now explicitly allowed.
PyPI package
~~~~~~~~~~~~
^^^^^^^^^^^^
Mayan EDMS has been packaged and submitted to the PyPI_ Python Package Index
making it even easier to install and use.
New REST API
~~~~~~~~~~~~
^^^^^^^^^^^^
This release feature a completely new REST API and automatic API documentation.
This new API is also used internally by *Mayan EDMS* itself.
This new API is also used internally by Mayan EDMS itself.
Other changes
~~~~~~~~~~~~~
^^^^^^^^^^^^^
More office document types are now recognized and supported. More file types are now
supported as text files and properly previewed and parsed. Removal of the legacy
runserver.sh and runserver_plus.sh scripts. New document preview generation and
display pipeline, faster, simpler. Inclusion of a proof of concept compressed storage
backend.
Upgrading from a previous version
=================================
---------------------------------
If you installed Mayan EDMS by cloning the Git repository issue the commands::
$ git reset --hard HEAD
@@ -175,7 +208,8 @@ The upgrade procedure is now complete.
Backward incompatible changes
=============================
-----------------------------
* If using the SQLite3 database option, rename the file named `mayan.sqlite` file to `db.sqlite3` and
move it to the new `media` provided folder.
* Also move to the `media` folder any `gpg_home`, `document_storage` and `image_cache` folders
@@ -183,7 +217,8 @@ Backward incompatible changes
Bugs fixed or issues closed
===========================
---------------------------
* None

View File

@@ -1,18 +1,19 @@
===============================
Mayan EDMS v1.1.1 release notes
===============================
Version 1.1.1
=============
Released: May 21, 2015
What's new
==========
Changes
-------
Update to Django 1.6.11
~~~~~~~~~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^^^^^^^^^
The required version of Django has been updated to version 1.6.11_.
Minor changes
~~~~~~~~~~~~~
^^^^^^^^^^^^^
- Fix make_dist.sh script
- Add test for issue #163
- Activate tests for the sources app
@@ -25,11 +26,12 @@ Minor changes
- Increase size of the lock name field
- New style documentation
Upgrading from a previous version
=================================
---------------------------------
Using PIP
~~~~~~~~~
^^^^^^^^^
Type in the console::
@@ -37,8 +39,9 @@ Type in the console::
the requirements will also be updated.
Using Git
~~~~~~~~~
^^^^^^^^^
If you installed Mayan EDMS by cloning the Git repository issue the commands::
@@ -51,8 +54,9 @@ Next upgrade/add the new requirements::
$ pip install --upgrade -r requirements.txt
Common steps
~~~~~~~~~~~~
^^^^^^^^^^^^
Add new static media::
@@ -62,11 +66,14 @@ The upgrade procedure is now complete.
Backward incompatible changes
=============================
None
-----------------------------
* None
Bugs fixed or issues closed
===========================
None
---------------------------
* None
.. _1.6.11: https://docs.djangoproject.com/en/1.8/releases/1.6.11/

View File

@@ -1,17 +1,14 @@
=============================
Mayan EDMS v1.1 release notes
=============================
Version 1.1
===========
Released: February 10, 2015
Welcome to Mayan EDMS v1.1
What's new in Mayan EDMS v1.1
=============================
Changes
-------
Celery
~~~~~~
^^^^^^
All background tasks processing has been converted to use Celery_. By default
Mayan EDMS runs in "Eager" until a broker and result backend are configured
as per `Celery's documentation`_. This change made the built-in scheduler and
@@ -19,72 +16,83 @@ job_processing apps obsolete, both were removed.
Views namespaces
~~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^^
All views are namespaced_ with the name of the app which defines them. If you have
developed 3rd party apps for Mayan EDMS be sure to update any reference to a view
by prepending the app name to the view name.
Removal of the splash screen
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
The static image home screen has been replaced with a quick links view, showing
the most used actions: Uploading documents, viewing recent documents, viewing
all documents and searching documents.
Sending and receiving documents via email
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
A link or entire documents can be sent as attachments via email. Documents can
also be received via email with the addition of two document sources named IMAP and POP3
which correspond to the mail protocol used to fetch the documents. Read Django's
`email configuration settings documentation`_ for more details on how to set up
mail serving.
also be received via email with the addition of two document sources named IMAP
and POP3 which correspond to the mail protocol used to fetch the documents.
Read Django's `email configuration settings documentation`_ for more details
on how to set up mail serving.
Update to Django 1.6.8
~~~~~~~~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^^^^^^^^
Mayan EDMS has been updated to use Django 1.6.8.
Events app
~~~~~~~~~~
^^^^^^^^^^
The built-in history app has been removed in favor of a new events wrapper app
for `Django activity stream`_
Watch folders
~~~~~~~~~~~~~
^^^^^^^^^^^^^
Filesystem folders can be monitored for change and their files automatically
uploaded as documents in Mayan EDMS.
Vagrant file included
~~~~~~~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^^^^^^^
A vagrant file is now included to allow developers to provision a virtual machine
with the latest development version of Mayan EDMS.
User locale profile (language and timezone)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Interface language and locale setting can now be setup for each user and are not
installation wide as before. Date and times offsets are automatically ajusted to
each user's timezone settings.
Document states
~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^
A new simple workflow app that can represent document states has been included.
Explicit document types needed per index
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Indexes can now be tied to document types, eliminating the need to update
indexes for every document update. Indexes will only update when a document of
the type to which they are associated is updated.
Optional and required metadata types
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Metadata types can now be assigned in two ways to documents types, as optional or
required. Values for required metadata types as the name implies, must be entered
for documents to be able to be uploaded. Optional metadata types on the other hand
@@ -92,14 +100,16 @@ can be left blank by the user.
Bulk document type change
~~~~~~~~~~~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^^^^^^^^^^^
It is now possible to change the document type of previously uploaded documents.
When the document type of a document is changed the metadata values are reset and
the metadata types of the new document type are automatically assigned.
New release cycle
~~~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^^^
Starting with this version a new release cycle methodology will come into effect.
The goal of this release cycle is to allow two series of versions of Mayan EDMS to be
active at a given time: A new major version with new functionality and a minor version
@@ -110,29 +120,36 @@ maintenance mode.
Deprecation of Python 2.6
~~~~~~~~~~~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^^^^^^^^^^^
Series 1.0 of Mayan EDMS will be the last series supporting Python 2.6. Series
2.0 will be using Django 1.7.x which itself requires Python 2.7 or later.
Improved testings
~~~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^^^
Mayan EDMS is now automatically tested against SQLite, MySQL and PostgreSQL.
API updates
~~~~~~~~~~~
Many new API endpoints have been added exposing the majority of Mayan EDMS functionality.
^^^^^^^^^^^
Many new API endpoints have been added exposing the majority of Mayan EDMS
functionality.
Messages contextual improvements
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Many updates and simplifications were made to the source text messages to reduce the
difficulty of translating Mayan EDMS and maintaing the contextual meaning of the
text messages.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Many updates and simplifications were made to the source text messages to
reduce the difficulty of translating Mayan EDMS and maintaing the contextual
meaning of the text messages.
Improved method for custom settings
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Custom settings now use a string based value, it is longer needed to import
classes when customizing a setting::
@@ -145,64 +162,71 @@ Instead the fully qualified name of the class must be passed as the setting valu
Removal of the OCR config setting
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
OCR behavior is now a document type property meaning that it can be turned
on or off for specific document types.
Per document language setting
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Previously the document language used for OCR was specified for the entire
installation. If documents in multiple languages were uploaded some suffered
lower success rates. Now the language of each document can be specified.
Metadata validation and parsing support
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
It is now possible to create functions to validate metadata value input or
parse and store corrected values. Three sample metadata validations functions
are included: ``Parse date and time``, ``Parse date`` and ``Parse time``.
Removal of 960 grid system in favor Pure CSS's grid system
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
By using Pure CSS's columns based grid system, the move towards a
Bootstrap UI migration has advanced greatly.
Simplified UI
~~~~~~~~~~~~~
^^^^^^^^^^^^^
All user actions as well as the logout button are now under the user functions
section.
Stable PDF previews generation
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
The way PDF were being generated has been improved greatly eliminating
spurious segmentation faults at the expense of a small speed penalty.
More technical documentation
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Many new sub topics were added to the development section of the documentation
to allow developers to better understand the inner workings and philosophies
of Mayan EDMS.
Other changes
~~~~~~~~~~~~~
^^^^^^^^^^^^^
* Removal of the MAIN_SIDE_BAR_SEARCH setting
* Removal of THEMES and themes support
* Removal of VERBOSE_LOGIN setting
* Removal of the ``MAIN_SIDE_BAR_SEARCH`` setting
* Removal of ``THEMES`` setting and themes support
* Removal of ``VERBOSE_LOGIN`` setting
* Removal of graphics backend supported file format list view
* Removal of the MAIN_DISABLE_ICONS setting
* Removal of the ``MAIN_DISABLE_ICONS`` setting
* Removal of specialized Sentry support
* Removal of the MAIN_ENABLE_SCROLL_JS setting
* Removal of the ``MAIN_ENABLE_SCROLL_JS`` setting
* Remove hardcoded root (/) redirections
* Removal of APSCheduler as a requirement
* Removal of ``APSCheduler`` as a requirement
* Removal of the scheduled jobs view
* Removal of the web_theme app
* Removal of the ``web_theme`` app
* Removal of the sources icon selection support
* Removal of the in-app help panels
* Removal of the duplicate document search feature
@@ -212,7 +236,8 @@ Other changes
Upgrading from a previous version
=================================
---------------------------------
IMPORTANT! Before running the upgrade make sure none of your documents have
duplicated metadata types, meaning that the same metadata type must not appear
twice for any given document.
@@ -240,7 +265,7 @@ Migrate existing database schema with::
During the migration several messages of stale content types can occur:
.. code-block:: bash
::
The following content types are stale and need to be deleted:
@@ -278,7 +303,7 @@ The upgrade procedure is now complete.
Backward incompatible changes
=============================
-----------------------------
* You will have to redefine your document sources due to the new extended models
for this app.
@@ -287,80 +312,80 @@ Backward incompatible changes
Bugs fixed or issues closed
===========================
---------------------------
* `issue #30 <https://github.com/mayan-edms/mayan-edms/issues/30>`_ Document workflows
* `issue #32 <https://github.com/mayan-edms/mayan-edms/issues/32>`_ Watched folders
* `issue #34 <https://github.com/mayan-edms/mayan-edms/issues/34>`_ Postprocessing document queue
* `issue #35 <https://github.com/mayan-edms/mayan-edms/issues/35>`_ Metadata validation
* `issue #37 <https://github.com/mayan-edms/mayan-edms/issues/37>`_ Add from __future__ import unicode_literals
* `issue #39 <https://github.com/mayan-edms/mayan-edms/issues/39>`_ Capitalization of messages
* `issue #40 <https://github.com/mayan-edms/mayan-edms/issues/40>`_ Update references to root ('/') path
* `issue #46 <https://github.com/mayan-edms/mayan-edms/issues/46>`_ Advanced search past 1st page
* `issue #49 <https://github.com/mayan-edms/mayan-edms/issues/49>`_ Problems with large pdf files
* `issue #50 <https://github.com/mayan-edms/mayan-edms/issues/50>`_ raise CommandNotFound(path)
* `issue #51 <https://github.com/mayan-edms/mayan-edms/issues/51>`_ Search with ANONYMOUS error
* `issue #55 <https://github.com/mayan-edms/mayan-edms/issues/55>`_ Document approval cicle?
* `issue #56 <https://github.com/mayan-edms/mayan-edms/issues/56>`_ Removal of non essential features, views, models
* `issue #57 <https://github.com/mayan-edms/mayan-edms/issues/57>`_ Migrate to Celery for task query and periodic tasks
* `issue #64 <https://github.com/mayan-edms/mayan-edms/issues/64>`_ Pluralize messages properly
* `issue #65 <https://github.com/mayan-edms/mayan-edms/issues/65>`_ Backport the ability to receive documents via email
* `issue #66 <https://github.com/mayan-edms/mayan-edms/issues/66>`_ Python 3 compatibility: Add from __future__ import unicode_literals and remove all u''
* `issue #68 <https://github.com/mayan-edms/mayan-edms/issues/68>`_ Revise and update the use gettext vs. gettext_lazy
* `issue #69 <https://github.com/mayan-edms/mayan-edms/issues/69>`_ Feature removal: remove "Unregistered" message from the title bar
* `issue #71 <https://github.com/mayan-edms/mayan-edms/issues/71>`_ Add retry support to the converter task
* `issue #72 <https://github.com/mayan-edms/mayan-edms/issues/72>`_ Delete unused static icons
* `issue #74 <https://github.com/mayan-edms/mayan-edms/issues/74>`_ Cache a document's first document version
* `issue #75 <https://github.com/mayan-edms/mayan-edms/issues/75>`_ Move automatic OCR queueing from a configuration settings to a property of Document Type model
* `issue #77 <https://github.com/mayan-edms/mayan-edms/issues/77>`_ Add document view permission support to the search app
* `issue #78 <https://github.com/mayan-edms/mayan-edms/issues/78>`_ COMMON_TEMPORARY_DIRECTORY seems not to be used everywhere
* `issue #79 <https://github.com/mayan-edms/mayan-edms/issues/79>`_ Error installing
* `issue #82 <https://github.com/mayan-edms/mayan-edms/issues/82>`_ Make document type a required field
* `issue #83 <https://github.com/mayan-edms/mayan-edms/issues/83>`_ Simplify source app views and navigation
* `issue #84 <https://github.com/mayan-edms/mayan-edms/issues/84>`_ Remove template context variable 'object_name' to improve translations
* `issue #85 <https://github.com/mayan-edms/mayan-edms/issues/85>`_ Reset page count for a single document
* `issue #86 <https://github.com/mayan-edms/mayan-edms/issues/86>`_ Move migrations to new 'south_migrations' folders
* `issue #87 <https://github.com/mayan-edms/mayan-edms/issues/87>`_ Per document language selection
* `issue #88 <https://github.com/mayan-edms/mayan-edms/issues/88>`_ Remove metadata type selection from the upload wizard
* `issue #89 <https://github.com/mayan-edms/mayan-edms/issues/89>`_ Allow metadata types to be required for specific document types
* `issue #90 <https://github.com/mayan-edms/mayan-edms/issues/90>`_ Remove the app_registry app
* `issue #91 <https://github.com/mayan-edms/mayan-edms/issues/91>`_ Don't preserve the ?page= URL query string value when switching sources during document upload
* `issue #92 <https://github.com/mayan-edms/mayan-edms/issues/92>`_ Make register_multi_item_links class aware
* `issue #95 <https://github.com/mayan-edms/mayan-edms/issues/95>`_ Installation error on Mac OSX; OSError: [Errno 2] No such file or directory
* `issue #96 <https://github.com/mayan-edms/mayan-edms/issues/96>`_ Remove hard code User model references
* `issue #97 <https://github.com/mayan-edms/mayan-edms/issues/97>`_ Make multi item links a drop down list
* `issue #104 <https://github.com/mayan-edms/mayan-edms/issues/104>`_ Finish polishing metadata validation patch
* `issue #105 <https://github.com/mayan-edms/mayan-edms/issues/105>`_ Tie smart links setups to document types
* `issue #106 <https://github.com/mayan-edms/mayan-edms/issues/106>`_ Convert document indexing app actions to Celery
* `issue #107 <https://github.com/mayan-edms/mayan-edms/issues/107>`_ Restrict document metadata addition and removal
* `issue #108 <https://github.com/mayan-edms/mayan-edms/issues/108>`_ New home screen
* `issue #109 <https://github.com/mayan-edms/mayan-edms/issues/109>`_ Add Roles API endpoints
* `issue #111 <https://github.com/mayan-edms/mayan-edms/issues/111>`_ Add Checkouts API endpoints
* `issue #112 <https://github.com/mayan-edms/mayan-edms/issues/112>`_ Add OCR API endpoints
* `issue #114 <https://github.com/mayan-edms/mayan-edms/issues/114>`_ Implement UI language as user preference
* `issue #116 <https://github.com/mayan-edms/mayan-edms/issues/116>`_ Add documentation topic explicitly noting the binary requirements
* `issue #118 <https://github.com/mayan-edms/mayan-edms/issues/118>`_ When a metadata type is removed from a document type, remove it from all the documents of that type
* `issue #119 <https://github.com/mayan-edms/mayan-edms/issues/119>`_ When a required metadata type is added to a document type, add it to all documents of that type
* `issue #126 <https://github.com/mayan-edms/mayan-edms/issues/126>`_ Failing migration with SQLite
* `issue #127 <https://github.com/mayan-edms/mayan-edms/issues/127>`_ Failing migration with Postgres
* `issue #128 <https://github.com/mayan-edms/mayan-edms/issues/128>`_ Add Indexes API endpoints
* `issue #129 <https://github.com/mayan-edms/mayan-edms/issues/129>`_ Search api shouldn't memorize requested page as part of the query
* `issue #130 <https://github.com/mayan-edms/mayan-edms/issues/130>`_ Users API is not working correctly
* `issue #131 <https://github.com/mayan-edms/mayan-edms/issues/131>`_ Is there an API to update a user's password?
* `issue #137 <https://github.com/mayan-edms/mayan-edms/issues/137>`_ Enhancement of language selection
* `issue #138 <https://github.com/mayan-edms/mayan-edms/issues/138>`_ Possibility to keep zoom factor
* `issue #139 <https://github.com/mayan-edms/mayan-edms/issues/139>`_ Translatability of language selection
* `issue #140 <https://github.com/mayan-edms/mayan-edms/issues/140>`_ Thumbnail creation for ods crashing
* `issue #143 <https://github.com/mayan-edms/mayan-edms/issues/143>`_ Exception Value: 'exceptions.ValueError' object has no attribute 'messages'
* `issue #144 <https://github.com/mayan-edms/mayan-edms/issues/144>`_ Behavior of 'Edit metadata' (Recent Documents)
* `issue #146 <https://github.com/mayan-edms/mayan-edms/issues/146>`_ Periodic task not initiated for mail boxes and watch folders
* `issue #149 <https://github.com/mayan-edms/mayan-edms/issues/149>`_ Attribute error in document download
* `issue #150 <https://github.com/mayan-edms/mayan-edms/issues/150>`_ Double second menu entry
* `issue #152 <https://github.com/mayan-edms/mayan-edms/issues/152>`_ Document content empty
* `issue #153 <https://github.com/mayan-edms/mayan-edms/issues/153>`_ south migration with postgres: documents: 031_remove_orphan_documents
* `issue #154 <https://github.com/mayan-edms/mayan-edms/issues/154>`_ south migration with postgres: tags: 0002_auto__add_tag__chg_field_tagproperties_tag
* `issue #157 <https://github.com/mayan-edms/mayan-edms/issues/157>`_ upload new version of a document not working
* `issue #158 <https://github.com/mayan-edms/mayan-edms/issues/158>`_ Plural form not matching singular form in ocr app bug i18n
* :github-issue:`30` Document workflows
* :github-issue:`32` Watched folders
* :github-issue:`34` Postprocessing document queue
* :github-issue:`35` Metadata validation
* :github-issue:`37` Add from __future__ import unicode_literals
* :github-issue:`39` Capitalization of messages
* :github-issue:`40` Update references to root ('/') path
* :github-issue:`46` Advanced search past 1st page
* :github-issue:`49` Problems with large pdf files
* :github-issue:`50` raise CommandNotFound(path)
* :github-issue:`51` Search with ANONYMOUS error
* :github-issue:`55` Document approval cicle?
* :github-issue:`56` Removal of non essential features, views, models
* :github-issue:`57` Migrate to Celery for task query and periodic tasks
* :github-issue:`64` Pluralize messages properly
* :github-issue:`65` Backport the ability to receive documents via email
* :github-issue:`66` Python 3 compatibility: Add from __future__ import unicode_literals and remove all u''
* :github-issue:`68` Revise and update the use gettext vs. gettext_lazy
* :github-issue:`69` Feature removal: remove "Unregistered" message from the title bar
* :github-issue:`71` Add retry support to the converter task
* :github-issue:`72` Delete unused static icons
* :github-issue:`74` Cache a document's first document version
* :github-issue:`75` Move automatic OCR queueing from a configuration settings to a property of Document Type model
* :github-issue:`77` Add document view permission support to the search app
* :github-issue:`78` COMMON_TEMPORARY_DIRECTORY seems not to be used everywhere
* :github-issue:`79` Error installing
* :github-issue:`82` Make document type a required field
* :github-issue:`83` Simplify source app views and navigation
* :github-issue:`84` Remove template context variable 'object_name' to improve translations
* :github-issue:`85` Reset page count for a single document
* :github-issue:`86` Move migrations to new 'south_migrations' folders
* :github-issue:`87` Per document language selection
* :github-issue:`88` Remove metadata type selection from the upload wizard
* :github-issue:`89` Allow metadata types to be required for specific document types
* :github-issue:`90` Remove the app_registry app
* :github-issue:`91` Don't preserve the ?page= URL query string value when switching sources during document upload
* :github-issue:`92` Make register_multi_item_links class aware
* :github-issue:`95` Installation error on Mac OSX; OSError: [Errno 2] No such file or directory
* :github-issue:`96` Remove hard code User model references
* :github-issue:`97` Make multi item links a drop down list
* :github-issue:`104` Finish polishing metadata validation patch
* :github-issue:`105` Tie smart links setups to document types
* :github-issue:`106` Convert document indexing app actions to Celery
* :github-issue:`107` Restrict document metadata addition and removal
* :github-issue:`108` New home screen
* :github-issue:`109` Add Roles API endpoints
* :github-issue:`111` Add Checkouts API endpoints
* :github-issue:`112` Add OCR API endpoints
* :github-issue:`114` Implement UI language as user preference
* :github-issue:`116` Add documentation topic explicitly noting the binary requirements
* :github-issue:`118` When a metadata type is removed from a document type, remove it from all the documents of that type
* :github-issue:`119` When a required metadata type is added to a document type, add it to all documents of that type
* :github-issue:`126` Failing migration with SQLite
* :github-issue:`127` Failing migration with Postgres
* :github-issue:`128` Add Indexes API endpoints
* :github-issue:`129` Search api shouldn't memorize requested page as part of the query
* :github-issue:`130` Users API is not working correctly
* :github-issue:`131` Is there an API to update a user's password?
* :github-issue:`137` Enhancement of language selection
* :github-issue:`138` Possibility to keep zoom factor
* :github-issue:`139` Translatability of language selection
* :github-issue:`140` Thumbnail creation for ods crashing
* :github-issue:`143` Exception Value: 'exceptions.ValueError' object has no attribute 'messages'
* :github-issue:`144` Behavior of 'Edit metadata' (Recent Documents)
* :github-issue:`146` Periodic task not initiated for mail boxes and watch folders
* :github-issue:`149` Attribute error in document download
* :github-issue:`150` Double second menu entry
* :github-issue:`152` Document content empty
* :github-issue:`153` south migration with postgres: documents: 031_remove_orphan_documents
* :github-issue:`154` south migration with postgres: tags: 0002_auto__add_tag__chg_field_tagproperties_tag
* :github-issue:`157` upload new version of a document not working
* :github-issue:`158` Plural form not matching singular form in ocr app bug i18n
.. _Celery: http://www.celeryproject.org/

View File

@@ -1,31 +1,34 @@
===============================
Mayan EDMS v2.0.1 release notes
===============================
Version 2.0.1
=============
Released: January 22, 2016
Welcome to Mayan EDMS v2.0.1
What's new in Mayan EDMS v2.0.1
===============================
Changes
-------
Required metadata was not enforce correctly
-------------------------------------------
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Fixed a situation where documents having required metadata could still be
uploaded without entering a value for the required metadata.
Fix multiple document metadata adding
-------------------------------------
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Fixed a bug when adding metadata to multiple documents.
Fix multiple document metadata editing
--------------------------------------
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Fixed a bug that made it impossible to edit multiple documents' metadata values
if one of the documents had no previous value for it's metadata.
Updated Vagrant file
--------------------
^^^^^^^^^^^^^^^^^^^^
The included Vagrant file now provide 2 boxes: development and production.
Selection which kind of box to provision is as easy as executing::
@@ -37,18 +40,22 @@ or
Other changes
-------------
^^^^^^^^^^^^^
* None
Removals
--------
* None
Upgrading from a previous version
---------------------------------
Using PIP
~~~~~~~~~
^^^^^^^^^
Type in the console::
@@ -56,8 +63,9 @@ Type in the console::
the requirements will also be updated automatically.
Using Git
~~~~~~~~~
^^^^^^^^^
If you installed Mayan EDMS by cloning the Git repository issue the commands::
@@ -71,8 +79,9 @@ Next upgrade/add the new requirements::
$ pip install --upgrade -r requirements.txt
Common steps
~~~~~~~~~~~~
^^^^^^^^^^^^
Migrate existing database schema with::
@@ -86,14 +95,15 @@ The upgrade procedure is now complete.
Backward incompatible changes
=============================
-----------------------------
* None
Bugs fixed or issues closed
===========================
* `GitLab issue #243 <https://gitlab.com/mayan-edms/mayan-edms/issues/243>`_ System allows a user to skip entering values for a required metadata field while uploading a new document
* `GitLab issue #245 <https://gitlab.com/mayan-edms/mayan-edms/issues/245>`_ Add multiple metadata not possible
Bugs fixed or issues closed
---------------------------
* :gitlab-issue:`243` System allows a user to skip entering values for a required metadata field while uploading a new document
* :gitlab-issue:`245` Add multiple metadata not possible
.. _PyPI: https://pypi.python.org/pypi/mayan-edms/

View File

@@ -1,34 +1,39 @@
===============================
Mayan EDMS v2.0.2 release notes
===============================
Version 2.0.2
=============
Released: February 15, 2016
Welcome to Mayan EDMS v2.0.2
What's new
==========
Changes
-------
Fine tune "Update" checkbox from the metadata entry form
--------------------------------------------------------
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Previously the update checkbox was ignored during the metadata step of the
document upload wizard with the wizard always creating a metadata entry for the
new document even if the entry was left blank. The checkbox now controls whether
or not the wizard will store try to create the metadata entry.
Fix empty optional lookup metadata fields behavior
--------------------------------------------------
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
An edge case was fixed that caused validation to be executed for empty metadata
fields that had a value lookup list.
Remove Docker files
-------------------
^^^^^^^^^^^^^^^^^^^
Included Docker and Docker Compose files were removed since the Mayan EDMS Docker
(https://gitlab.com/mayan-edms/mayan-edms-docker) repository is stable.
Other changes
-------------
- Only extract validation error messages from ValidationError exception instances.
^^^^^^^^^^^^^
- Only extract validation error messages from ``ValidationError`` exception
instances.
- Add 2 second delay to document version tests to workaround MySQL not storing
the millisecond part of the document version's timestamp.
- Install testing dependencies when installing development dependencies.
@@ -36,15 +41,18 @@ Other changes
- Move metadata form value validation to .clean() method.
- Add HTML tags stripping to the browser title generation template.
Removals
--------
* None
Upgrading from a previous version
---------------------------------
Using PIP
~~~~~~~~~
^^^^^^^^^
Type in the console::
@@ -52,8 +60,9 @@ Type in the console::
the requirements will also be updated automatically.
Using Git
~~~~~~~~~
^^^^^^^^^
If you installed Mayan EDMS by cloning the Git repository issue the commands::
@@ -67,8 +76,9 @@ Next upgrade/add the new requirements::
$ pip install --upgrade -r requirements.txt
Common steps
~~~~~~~~~~~~
^^^^^^^^^^^^
Migrate existing database schema with::
@@ -82,13 +92,14 @@ The upgrade procedure is now complete.
Backward incompatible changes
=============================
-----------------------------
* None
Bugs fixed or issues closed
===========================
* `GitLab issue #250 <https://gitlab.com/mayan-edms/mayan-edms/issues/250>`_ Empty optional lookup metadata trigger validation error.
Bugs fixed or issues closed
---------------------------
* :gitlab-issue:`250` Empty optional lookup metadata trigger validation error.
.. _PyPI: https://pypi.python.org/pypi/mayan-edms/

File diff suppressed because it is too large Load Diff

View File

@@ -1,41 +1,46 @@
===============================
Mayan EDMS v2.1.1 release notes
===============================
Version 2.1.1
=============
Released: May 17, 2016
What's new
==========
This is a bugfix release and all users are encouraged to upgrade.
Changes
-------
Fix object column resolution issue in navigation app
----------------------------------------------------
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Version 2.1 includes a navigation feature that allows model instances from a
queryset generated using the .defer() or .only() Django filter optimization
features to resolve to their parent class transparently. This optimization
caused problems with the sources app which uses a
Missing Tesseract language files
--------------------------------
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
The Tesseract OCR backend now reports if the tesseract language file is missing
for the requested document's language.
Other changes
-------------
^^^^^^^^^^^^^
- Ensure the automatic default index is created after the default document type.
Removals
--------
* None
Upgrading from a previous version
---------------------------------
Using PIP
~~~~~~~~~
^^^^^^^^^
Type in the console::
@@ -43,8 +48,9 @@ Type in the console::
the requirements will also be updated automatically.
Using Git
~~~~~~~~~
^^^^^^^^^
If you installed Mayan EDMS by cloning the Git repository issue the commands::
@@ -58,8 +64,9 @@ Next upgrade/add the new requirements::
$ pip install --upgrade -r requirements.txt
Common steps
~~~~~~~~~~~~
^^^^^^^^^^^^
Migrate existing database schema with::
@@ -73,15 +80,16 @@ The upgrade procedure is now complete.
Backward incompatible changes
=============================
-----------------------------
* None
Bugs fixed or issues closed
===========================
* `GitLab issue #288 <https://gitlab.com/mayan-edms/mayan-edms/issues/288>`_ Can't add sources in mayan-edms 2.1.
* `GitLab issue #289 <https://gitlab.com/mayan-edms/mayan-edms/issues/289>`_ OCR fails with Exception.
Bugs fixed or issues closed
---------------------------
* :gitlab-issue:`288` Can't add sources in mayan-edms 2.1.
* :gitlab-issue:`289` OCR fails with Exception.
.. _PyPI: https://pypi.python.org/pypi/mayan-edms/

View File

@@ -1,31 +1,30 @@
================================
Mayan EDMS v2.1.10 release notes
================================
Version 2.1.10
==============
Released: February 13, 2017
What's new
==========
This is a micro release equal to the previews version from the user's point of view.
The version number was increase to workaround some issues with the Python
Package Index not allowing re-uploads.
Changes
-------------
-------
- Update Makefile to use twine for releases.
- Add Makefile target to make test releases.
Removals
--------
* None
Upgrading from a previous version
---------------------------------
Using PIP
~~~~~~~~~
^^^^^^^^^
Type in the console::
@@ -33,8 +32,9 @@ Type in the console::
the requirements will also be updated automatically.
Using Git
~~~~~~~~~
^^^^^^^^^
If you installed Mayan EDMS by cloning the Git repository issue the commands::
@@ -48,8 +48,9 @@ Next upgrade/add the new requirements::
$ pip install --upgrade -r requirements.txt
Common steps
~~~~~~~~~~~~
^^^^^^^^^^^^
Migrate existing database schema with::
@@ -63,12 +64,13 @@ The upgrade procedure is now complete.
Backward incompatible changes
=============================
-----------------------------
* None
Bugs fixed or issues closed
===========================
---------------------------
* None

View File

@@ -1,17 +1,13 @@
================================
Mayan EDMS v2.1.11 release notes
================================
Version 2.1.11
==============
Released: March 14, 2017
What's new
==========
This is a bug-fix release and all users are encouraged to upgrade. The focus
of this micro release was REST API improvement.
Changes
-------------
-------
- Added a quick rename serializer to the document type API serializer.
- Added per document type, workflow list API view. The URL for this endpoint is
@@ -24,7 +20,7 @@ Changes
- Implemented document workflows transition ACLs. GitLab issue #321.
- Add document comments API endpoints. GitHub issue #249.
- Add support for overriding the Celery class. The setting is named
MAYAN_CELERY_CLASS and expects a dotted python path to the class to use.
``MAYAN_CELERY_CLASS`` and expects a dotted python path to the class to use.
- Changed the document upload view in source app to not use the HTTP referer
URL blindly, but instead recompose the URL using known view name. Needed
when integrating Mayan EDMS into other app via using iframes.
@@ -34,15 +30,18 @@ Changes
- Added support for adding or editing document types to smart links via the
API.
Removals
--------
* None
Upgrading from a previous version
---------------------------------
Using PIP
~~~~~~~~~
^^^^^^^^^
Type in the console::
@@ -50,8 +49,9 @@ Type in the console::
the requirements will also be updated automatically.
Using Git
~~~~~~~~~
^^^^^^^^^
If you installed Mayan EDMS by cloning the Git repository issue the commands::
@@ -65,8 +65,9 @@ Next upgrade/add the new requirements::
$ pip install --upgrade -r requirements.txt
Common steps
~~~~~~~~~~~~
^^^^^^^^^^^^
Migrate existing database schema with::
@@ -80,15 +81,16 @@ The upgrade procedure is now complete.
Backward incompatible changes
=============================
-----------------------------
* None
Bugs fixed or issues closed
===========================
* `Github issue #249 <https://github.com/mayan-edms/mayan-edms/issues/249>`_ Add document comments API [$50 US]
* `GitLab issue #321 <https://gitlab.com/mayan-edms/mayan-edms/issues/321>`_ Transition ACLS
* `GitLab issue #357 <https://gitlab.com/mayan-edms/mayan-edms/issues/357>`_ It should be possible to retrieve all workflows for a given DocumentType from the API
Bugs fixed or issues closed
---------------------------
* :github-issue:`355` Add document comments API [$50 US]
* :gitlab-issue:`321` Transition ACLS
* :gitlab-issue:`357` It should be possible to retrieve all workflows for a given DocumentType from the API
.. _PyPI: https://pypi.python.org/pypi/mayan-edms/

View File

@@ -1,40 +1,45 @@
===============================
Mayan EDMS v2.1.2 release notes
===============================
Version 2.1.2
=============
Released: May 20, 2016
What's new
==========
This is a bugfix release and all users are encouraged to upgrade.
Changes
-------
Language list sorting
---------------------
^^^^^^^^^^^^^^^^^^^^^
The document language list and the user locale profile language list are now
sorted to make it easier to find the desired language.
Fixed the metadata lookup options: {{ users }} and {{ groups }}
---------------------------------------------------------------
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
When configuring metadata type lookup options the {{ users }} and {{ groups }}
special options can be used to display a list of users or a list of groups.
These options where producing a list in the wrong format and were updated.
Other changes
-------------
^^^^^^^^^^^^^
- Add Makefile for common development tasks
Removals
--------
* None
Upgrading from a previous version
---------------------------------
Using PIP
~~~~~~~~~
^^^^^^^^^
Type in the console::
@@ -42,8 +47,9 @@ Type in the console::
the requirements will also be updated automatically.
Using Git
~~~~~~~~~
^^^^^^^^^
If you installed Mayan EDMS by cloning the Git repository issue the commands::
@@ -57,8 +63,9 @@ Next upgrade/add the new requirements::
$ pip install --upgrade -r requirements.txt
Common steps
~~~~~~~~~~~~
^^^^^^^^^^^^
Migrate existing database schema with::
@@ -72,15 +79,15 @@ The upgrade procedure is now complete.
Backward incompatible changes
=============================
-----------------------------
* None
Bugs fixed or issues closed
===========================
* `GitLab issue #290 <https://gitlab.com/mayan-edms/mayan-edms/issues/290>`_ Unicode characters not supported as metadata values
* `GitLab issue #292 <https://gitlab.com/mayan-edms/mayan-edms/issues/292>`_ Sort languages by name not by abbreviation
---------------------------
* :gitlab-issue:`290` Unicode characters not supported as metadata values
* :gitlab-issue:`292` Sort languages by name not by abbreviation
.. _PyPI: https://pypi.python.org/pypi/mayan-edms/

View File

@@ -1,24 +1,26 @@
===============================
Mayan EDMS v2.1.3 release notes
===============================
Version 2.1.3
=============
Released: June 29, 2016
What's new
==========
This is a bug-fix release and all users are encouraged to upgrade.
Changes
-------
Temporary files cleanup
-----------------------
^^^^^^^^^^^^^^^^^^^^^^^
When uploading PDF files that had been OCRed by previous software, the text
parser backend that uses Poppler, would leave behind some temporary files in
the /tmp folder. The issue has been resolved and from the fix a test mixin
system check has been devised that will identify places in the codebase with
similar behaviors, reducing the recurrence of similar issues in the future.
Other changes
-------------
^^^^^^^^^^^^^
- Add help message when initialsetup migration phase fails. Relates to GitLab issue #296
- Start using self.setdout instead of print as per documentation.
- Fix GitLab issue #295, "When editing a user the top bar jumps to the name of the user".
@@ -27,15 +29,18 @@ Other changes
- Add missing temporary file cleanup for office documents.
- Fix file descriptor leak in the document signature download test.
Removals
--------
* None
Upgrading from a previous version
---------------------------------
Using PIP
~~~~~~~~~
^^^^^^^^^
Type in the console::
@@ -43,8 +48,9 @@ Type in the console::
the requirements will also be updated automatically.
Using Git
~~~~~~~~~
^^^^^^^^^
If you installed Mayan EDMS by cloning the Git repository issue the commands::
@@ -58,8 +64,9 @@ Next upgrade/add the new requirements::
$ pip install --upgrade -r requirements.txt
Common steps
~~~~~~~~~~~~
^^^^^^^^^^^^
Migrate existing database schema with::
@@ -73,15 +80,16 @@ The upgrade procedure is now complete.
Backward incompatible changes
=============================
-----------------------------
* None
Bugs fixed or issues closed
===========================
* `GitLab issue #295 <https://gitlab.com/mayan-edms/mayan-edms/issues/295>`_ When editing a user the top bar jumps to the name of the user
* `GitLab issue #309 <https://gitlab.com/mayan-edms/mayan-edms/issues/309>`_ Temp files quickly filling-up my /tmp (1GB tmpfs)
Bugs fixed or issues closed
---------------------------
* :gitlab-issue:`295` When editing a user the top bar jumps to the name of the user
* :gitlab-issue:`309` Temp files quickly filling-up my /tmp (1GB tmpfs)
.. _PyPI: https://pypi.python.org/pypi/mayan-edms/

View File

@@ -1,16 +1,13 @@
===============================
Mayan EDMS v2.1.4 release notes
===============================
Version 2.1.4
=============
Released: October 28, 2016
What's new
==========
This is a bug-fix release and all users are encouraged to upgrade.
Other changes
-------------
Changes
-------
- Fix statistics namespace list display view
- Fix events list display view
- Update required Django version to 1.8.15
@@ -21,15 +18,18 @@ Other changes
- New GPG backend system
- Minor documentation updates
Removals
--------
* None
Upgrading from a previous version
---------------------------------
Using PIP
~~~~~~~~~
^^^^^^^^^
Type in the console::
@@ -37,8 +37,9 @@ Type in the console::
the requirements will also be updated automatically.
Using Git
~~~~~~~~~
^^^^^^^^^
If you installed Mayan EDMS by cloning the Git repository issue the commands::
@@ -52,8 +53,9 @@ Next upgrade/add the new requirements::
$ pip install --upgrade -r requirements.txt
Common steps
~~~~~~~~~~~~
^^^^^^^^^^^^
Migrate existing database schema with::
@@ -67,15 +69,16 @@ The upgrade procedure is now complete.
Backward incompatible changes
=============================
-----------------------------
* None
Bugs fixed or issues closed
===========================
* `GitLab issue #311 <https://gitlab.com/mayan-edms/mayan-edms/issues/311>`_ acl page return ContentType:Document
* `GitLab issue #316 <https://gitlab.com/mayan-edms/mayan-edms/issues/316>`_ Error when trying to access the statistics
* `GitLab issue #324 <https://gitlab.com/mayan-edms/mayan-edms/issues/324>`_ Document signature tests fail in Ubuntu 16.10
Bugs fixed or issues closed
---------------------------
* :gitlab-issue:`311` acl page return ContentType:Document
* :gitlab-issue:`316` Error when trying to access the statistics
* :gitlab-issue:`324` Document signature tests fail in Ubuntu 16.10
.. _PyPI: https://pypi.python.org/pypi/mayan-edms/

View File

@@ -1,16 +1,12 @@
===============================
Mayan EDMS v2.1.5 release notes
===============================
Version 2.1.5
=============
Released: November 8, 2016
What's new
==========
This is a bug-fix release and all users are encouraged to upgrade.
Other changes
-------------
Changes
-------
- Backport resize transformation math operation fix (GitLab #319).
- Update Pillow to 3.1.2
@@ -24,15 +20,18 @@ Other changes
- Fix ACL create view HTML response type. (GitLab #335).
- Expland staging folder and watch folder explanation.
Removals
--------
* None
Upgrading from a previous version
---------------------------------
Using PIP
~~~~~~~~~
^^^^^^^^^
Type in the console::
@@ -40,8 +39,9 @@ Type in the console::
the requirements will also be updated automatically.
Using Git
~~~~~~~~~
^^^^^^^^^
If you installed Mayan EDMS by cloning the Git repository issue the commands::
@@ -55,8 +55,9 @@ Next upgrade/add the new requirements::
$ pip install --upgrade -r requirements.txt
Common steps
~~~~~~~~~~~~
^^^^^^^^^^^^
Migrate existing database schema with::
@@ -70,18 +71,18 @@ The upgrade procedure is now complete.
Backward incompatible changes
=============================
-----------------------------
* None
Bugs fixed or issues closed
===========================
* `GitLab issue #319 <https://gitlab.com/mayan-edms/mayan-edms/issues/319>`_ TransformationResize issue with very "long" image
* `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
---------------------------
* :gitlab-issue:`319` TransformationResize issue with very "long" image
* :gitlab-issue:`331` Trash List View: Items actions should be limited
* :gitlab-issue:`333` "Unable to run gpg - it may not be available."
* :gitlab-issue:`334` Perfomance improvment: prevent unnecessary image.resize in TransformationZoom
* :gitlab-issue:`335` Wrong HTML Content-Type in ACL->NEW
.. _PyPI: https://pypi.python.org/pypi/mayan-edms/

Some files were not shown because too many files have changed in this diff Show More