Compare commits

..

538 Commits

Author SHA1 Message Date
eed753a383 tesseract deu but restored else
All checks were successful
continuous-integration/drone/push Build is passing
2019-12-30 11:27:53 +01:00
6a67e34f10 debian 10 of course
Some checks failed
continuous-integration/drone/push Build is failing
2019-12-30 11:23:42 +01:00
b1596aeb89 debian 11 try
Some checks failed
continuous-integration/drone/push Build is failing
2019-12-30 11:21:19 +01:00
7c373df062 updated
Some checks failed
continuous-integration/drone/push Build is failing
2019-12-30 11:01:37 +01:00
1cee2c1a55 Merge tag 'v3.3.6'
Some checks failed
continuous-integration/drone/push Build is failing
Version 3.3.6
2019-12-30 10:44:44 +01:00
Roberto Rosario
fa899aa48d Bump version to 3.3.6
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-12-18 22:54:03 -04:00
Roberto Rosario
52011aca74 Add sources migration to add related name
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-12-18 22:52:20 -04:00
Roberto Rosario
4f9f0ee00d Update release notes
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-12-18 22:51:28 -04:00
Roberto Rosario
a78e47e276 Update PyPI address used for new version check
Avoid SSL errors from reusing the old address (pypi.python.org/pypi)
certificate.

GitLab issue #717. Thanks to Jordan Wages (@wagesj45) for the report.

Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-12-18 22:47:19 -04:00
Roberto Rosario
1a548a6df8 Update changelog and add release notes for 3.3.6
Add credit to Checkmarx SCA AppSec team for the research and
notification of reappearance of CVE-2018-16405 and GitLab
issue #494.

Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-12-18 17:43:10 -04:00
Roberto Rosario
f335b7d773 Fix typo in deploying chapter
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-12-18 17:42:51 -04:00
Roberto Rosario
bbcb0da836 Add macro for GitLab merge requests
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-12-18 17:42:07 -04:00
Roberto Rosario
42c6ce97ce Update py-amqp version
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-12-18 17:41:51 -04:00
Roberto Rosario
8a803f1a5e Update changelog
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-12-18 03:15:07 -04:00
Roberto Rosario
bccd542233 Update translation files
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-12-18 03:12:57 -04:00
Roberto Rosario
9d25665043 Merge branch 'versions/micro' into 'versions/micro'
Settings: Display overridden instead of overrided

See merge request mayan-edms/mayan-edms!65
2019-12-18 04:23:39 +00:00
Roberto Rosario
b78089cc4f Reapply fix for issue #494
Avoid exploit of cross site scripting in login view.
Thanks to Lokesh (@lokesh1095) for the report and solution.
GitLab issue #494.

Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-12-18 00:20:34 -04:00
Roberto Rosario
31bee80fa2 Improve the test view mixin
Allow test views to be public. Allow configurate test view template.

Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-12-17 23:57:20 -04:00
Roberto Rosario
c374c15972 Add test for issue #494
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-12-17 21:06:38 -04:00
Rob
b8c8994f32 Settings: Display overridden instead of overrided
Signed-off-by: Rob de Canha-Knight <rob@rob-knight.com>
2019-12-17 23:13:23 +00:00
Roberto Rosario
bf726245ff Add missing character in docker installation step
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-12-17 13:49:52 -04:00
Roberto Rosario
63d0144591 Add transaction handling to the interval sources
Adds transaction handling to the delete and save methods.

Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-12-17 01:37:12 -04:00
Roberto Rosario
675c1e5a30 Update changelog
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-12-17 01:34:43 -04:00
Roberto Rosario
4f1ecebcac Delete periodic task on document type delete
Closes Gitlab issue #715. Thanks to Rob de Canha-Knight (@rssfed23)
for the report and research.

Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-12-17 01:27:55 -04:00
Roberto Rosario
8b1c5eb868 Add test for GitLab issue #715
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-12-17 01:14:48 -04:00
Roberto Rosario
52804e6095 Update ZipArchive to work with badly coded files
Update the ZipArchive class to work with badly encoded filenames.

GitLab issue #651. Thanks to Fabian (@ruffy91) for the report.

Squashed commit of the following:
    Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>

commit 8ded3d09af16ea9457cbeef89ac4c72b3dde1fb5
Merge: 7889ff64d9 778c48d11d
Author: Roberto Rosario <roberto.rosario@mayan-edms.com>
Date:   Mon Dec 16 04:25:57 2019 -0400

    Merge branch 'versions/micro' into features/compressed_files_refactor

commit 7889ff64d9
Author: Roberto Rosario <roberto.rosario@mayan-edms.com>
Date:   Tue Oct 1 00:20:50 2019 -0400

    Document zip file encoding issues

    Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>

Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-12-16 04:37:30 -04:00
Roberto Rosario
778c48d11d Update Redis lock to support Redis version < 5.0
Update the Redis lock connection intialization so that is works with
Redis versions < 5.0.

GitLab issue #709. Rob de Canha-Knight (@rssfed23) for the report
and debug information.

Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-12-16 04:20:17 -04:00
Roberto Rosario
ef514d5310 Update test method name
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-12-15 23:09:02 -04:00
Roberto Rosario
6c828eaf94 Fix document orientaton detection
GitLab issue #713. Thanks to Rob de Canha-Knight (@rssfed23)
for the report and debug information.

Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-12-15 23:06:35 -04:00
Roberto Rosario
9a4f3f0332 Merge branch 'synque/mayan-edms-master' into merges/community 2019-12-15 05:34:18 -04:00
Roberto Rosario
5dc357c6a6 Merge branch 'O2Graphics/mayan-edms-fix-PDF-page-count' into merges/community 2019-12-15 05:30:43 -04:00
Roberto Rosario
7cbc6f9b40 Merge branch 'O2Graphics/mayan-edms-fix-BSD-paths' into merges/community 2019-12-15 05:26:12 -04:00
Roberto Rosario
c99db3da08 Make list toolbar sticky HTML element
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-12-15 05:16:19 -04:00
Roberto Rosario
1153661ff5 Update build string
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-12-13 05:04:42 -04:00
Roberto Rosario
48c37661f8 Bump version to 3.3.5
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-12-13 05:02:14 -04:00
Roberto Rosario
3a1ca76e5b Remove django-downloadview from dependencies
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-12-13 05:01:01 -04:00
Roberto Rosario
f2884607f5 PEP8 cleanups
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-12-13 04:59:41 -04:00
Roberto Rosario
2f4dc2b837 Add release notes
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-12-13 04:57:55 -04:00
Roberto Rosario
1201481ab4 Update translation files
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-12-13 04:07:00 -04:00
Roberto Rosario
53c57658e6 Update contributing file
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-12-13 01:15:33 -04:00
Roberto Rosario
1136ae57a4 Increase some file sizes
- Add or improve field help texts.

Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-12-12 20:45:23 -04:00
Roberto Rosario
ac1ad7a81b Add missing icons
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-12-12 20:42:35 -04:00
Roberto Rosario
a7b31fc171 Refactor and implement download code natively
- Use modified port of Django 2.2 FileResponse.
- Remove Django DownloadView library.

Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-12-12 19:39:44 -04:00
Roberto Rosario
826f7fddf2 Improve setting migration tests
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-12-12 19:37:25 -04:00
Roberto Rosario
a8562ef2e7 Normalize quote used in {% include %}
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-12-12 19:37:15 -04:00
Roberto Rosario
3c5811dacb Include attrs.html in form instance template
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-12-12 19:37:07 -04:00
Roberto Rosario
16e95ffc42 Add transformation metaclass in a way compatible
Use Django's with_metaclass to Work with Python 2 and Python 3.

Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-12-11 16:28:42 -04:00
Roberto Rosario
8cfb457cf1 Fix failing tests
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-12-11 01:45:42 -04:00
Roberto Rosario
856a24e9db Update translation files
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-12-11 01:33:07 -04:00
Roberto Rosario
062b28c871 Add the ID and the URL to the checkout serializer
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-12-10 23:07:25 -04:00
Roberto Rosario
888715c3cf Add migrations for the help text changes
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-12-10 22:34:13 -04:00
Roberto Rosario
9d5c4c017d Use TemplateField for smart links
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-12-10 22:33:20 -04:00
Roberto Rosario
0b4c8242ee Use TemplateField for the web link template
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-12-10 22:32:21 -04:00
Roberto Rosario
913e57a010 Show the available variable in the help text
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-12-10 22:31:08 -04:00
Roberto Rosario
1ee449d894 Exclude smart link setup columns and links
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-12-10 22:10:38 -04:00
Roberto Rosario
2b8ac4b5fe Don't show setup links for resolved links
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-12-10 22:03:26 -04:00
Roberto Rosario
88d29ecfc0 Update TemplateField to concatenate help texts
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-12-10 20:47:59 -04:00
Roberto Rosario
a7cf6b5664 Update migrations to accept migrated settings
- Unify all conditional YAML load under utils.smart_yaml_load.
- Update all setting migrations to use the smart setting test
  mixin to create the test config file.

Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-12-10 19:57:14 -04:00
Roberto Rosario
9e9db800ad Unify the creation of the test config file
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-12-10 19:26:05 -04:00
Carsten Neubert
a96b7b98fb Make build stage names lowercase 2019-12-10 21:45:42 +00:00
Roberto Rosario
51b400ed30 Update instances of "weblink" to "web link"
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-12-10 00:37:59 -04:00
Roberto Rosario
b6bc79ec88 Add librabbitmq to the removal list
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-12-09 23:21:23 -04:00
O2 Graphics
f895459d1f Fix page count on some PDF files, and fix a Python 3 incompatibility 2019-12-09 20:27:03 +01:00
O2 Graphics
4312b38af5 Improve the executables paths on FreeBSD/OpenBSD 2019-12-09 20:11:59 +01:00
O2 Graphics
e11e6f4724 Merge pull request #1 from mayan-edms/master
Update to last version
2019-12-09 20:00:33 +01:00
Roberto Rosario
9450040388 Pin kombu and django-timezone-field versions
GitLab issues #698 and #699.

Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-12-09 13:10:22 -04:00
Roberto Rosario
10372daede Update build string
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-12-09 01:59:29 -04:00
Roberto Rosario
0da5fa83dd Bump version to 3.3.4
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-12-09 01:58:31 -04:00
Roberto Rosario
cdb9094083 Update release notes
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-12-09 01:57:12 -04:00
Roberto Rosario
7cda344f40 Add a volume to the staging Redis container
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-12-09 01:41:19 -04:00
Roberto Rosario
68342b481b Darken content area when opening the mobile menu
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-12-09 01:09:56 -04:00
Roberto Rosario
3af04e8c42 Make setting text translatable
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-12-09 01:09:28 -04:00
Roberto Rosario
2a64308185 Add a volume to the staging RabbitMQ container
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-12-09 01:08:36 -04:00
Roberto Rosario
4b980fed1e Make setting string translatable
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-12-09 01:07:38 -04:00
Roberto Rosario
639108d6e6 Update translation files
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-12-09 01:02:30 -04:00
Roberto Rosario
4e664a6f92 Switch from librabbitmq to py-amqp
Closes GitLab issue #699. Thanks to  Rob de Canha-Knight
(@rssfed23) for the report, research, and debug.

Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-12-09 00:29:00 -04:00
Roberto Rosario
4e65a436c7 Fix evaluation priority of the bootstrap settings
Closes GitLab issue #702. Thanks to Kevin Pawsey (@kevinpawsey) for
the report and the help debuging the issue.

Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-12-09 00:21:15 -04:00
Roberto Rosario
d345f8e838 Fix docker-runtest-all target
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-12-08 18:54:25 -04:00
Roberto Rosario
d6cb42147d Add icons to the smart settings links
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-12-08 18:44:11 -04:00
Roberto Rosario
84bad05807 Make setting overriding more clear
Add better text explanation. Change the column to a check mark widget.
Helps GitLab issue #702.

Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-12-08 14:54:48 -04:00
Roberto Rosario
15b4df54bf Don't use attribute name if there is no help text
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-12-08 14:51:23 -04:00
Roberto Rosario
242a5c1d41 Add test for GitLab issue #702
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-12-08 14:35:54 -04:00
Roberto Rosario
948445c5d0 Support staging containers using RabbitMQ
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-12-08 03:02:49 -04:00
Roberto Rosario
0fa38a2833 Update devpi-server version to 5.3.1
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-12-08 03:00:46 -04:00
Roberto Rosario
a71db0b908 Add locking to the file metadata task
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-12-08 02:59:39 -04:00
Roberto Rosario
27b18c3fc6 Update metaclass passing to work on Python 3
Fixes transformation labels in view titles.

Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-12-07 19:17:58 -04:00
Roberto Rosario
edf7a71931 Update the gunicorn worker class to synchronous
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-12-07 19:07:03 -04:00
Roberto Rosario
e5e2e80a8c Update build string
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-12-05 06:33:39 -04:00
Roberto Rosario
af2d524287 Bump version to 3.3.3
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-12-05 06:32:40 -04:00
Roberto Rosario
7b2b189233 Update translation files
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-12-05 06:32:00 -04:00
Roberto Rosario
13788e121d Add release notes for version 3.3.3
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-12-05 06:05:36 -04:00
Roberto Rosario
af1ee3ae1a Mark missing indexing text as translatable
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-12-05 05:59:12 -04:00
Roberto Rosario
4afdac2b00 Add missing transformation view message display
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-12-05 05:58:31 -04:00
Roberto Rosario
40bd1b297c Auto create transformations without arguments
These are created directly from the selection form view.

Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-12-05 05:48:58 -04:00
Roberto Rosario
c3d9208aa3 Update changelog
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-12-05 05:16:55 -04:00
Roberto Rosario
2cdcba73f9 Fix transformation label display in create view
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-12-05 05:15:43 -04:00
Roberto Rosario
2313c35e59 Remove supervisor environment variable expansion
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-12-05 04:47:42 -04:00
Roberto Rosario
4418ad458e Don't exit if the branch to delete doesn't exist
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-12-05 04:47:04 -04:00
Roberto Rosario
0e8bdec1d0 Fix version number
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-12-05 03:22:06 -04:00
Roberto Rosario
1da655129d Update build string
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-12-05 01:53:47 -04:00
Roberto Rosario
9471b80fa5 Avoid running Mayan as root
This change avoid creating a lock file in the /tmp folder that
is owned by the root user.

Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-12-05 01:48:15 -04:00
Roberto Rosario
8a4413abce Bump version to 3.3.2
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-12-05 01:44:09 -04:00
Roberto Rosario
6dbbef3476 Update translation files
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-12-05 01:43:27 -04:00
Roberto Rosario
34668c0786 Update documentation
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-12-05 00:48:06 -04:00
Roberto Rosario
971f99c89a Add remaining setting migration tests
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-12-04 23:29:42 -04:00
Roberto Rosario
d2f3601770 Add document signature setting migration test
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-12-04 23:23:52 -04:00
Roberto Rosario
7a9333e44e Add documents app setting migration tests
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-12-04 23:21:22 -04:00
Roberto Rosario
8ff6eeec1f Add OCR app setting migrations
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-12-04 23:14:19 -04:00
Roberto Rosario
c21e33243c Fix sources app setting migrations
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-12-04 23:09:35 -04:00
Roberto Rosario
aa3495ff18 Improve setting migration method matching
Avoid executing a migrations for settings with similar but
shorter names.

Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-12-04 23:05:50 -04:00
Roberto Rosario
5070a4fcd6 Update build string
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-12-04 00:53:04 -04:00
Roberto Rosario
bd2f6eb035 Bump version to 3.3.1
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-12-04 00:51:09 -04:00
Roberto Rosario
2bdfb67eb5 Add 3.3.1 release notes
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-12-04 00:49:12 -04:00
Roberto Rosario
2d3b5b88df Change document parsing error list permission
The required permission changed from "View document parsed content"
to "Parse document". This way only users with the access to affect
the parsed content are the only ones that can view what errors
occurred during parsing.

Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-12-04 00:14:50 -04:00
Roberto Rosario
02e2c1dd01 Remove body spacer HTML and JavaScript
Not needed with the new UI.

Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-12-03 23:49:08 -04:00
Roberto Rosario
14df823568 Update Django to version 1.11.26
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-12-03 23:25:29 -04:00
Roberto Rosario
d240183073 Hide multi item selection text on mobile screens
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-12-03 23:23:17 -04:00
Roberto Rosario
3db4ad4fd0 Fix username color on mobile screens
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-12-03 23:22:40 -04:00
Roberto Rosario
196e2b5871 Update translation files
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-12-03 19:53:18 -04:00
Roberto Rosario
22d271bd3b Add sources settings migrations
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-12-03 18:11:35 -04:00
Roberto Rosario
4cc2522be6 Savesettings command fixes
Don't error out when saving a config if no previous config exists.

Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-12-03 18:10:19 -04:00
Roberto Rosario
2eac1b1c7d Get setting namespace info from config file
Instead of trying to get it from the Django setting file.

Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-12-03 18:07:43 -04:00
Roberto Rosario
9b5a7c9936 Add preparestatic command
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-12-03 17:31:47 -04:00
Roberto Rosario
2a80facf64 Update Celery broker environment variable
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-12-03 17:29:16 -04:00
Roberto Rosario
f61a90ece0 Add GitLab release targets to the documentation
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-12-03 03:23:18 -04:00
Roberto Rosario
5c15398ca8 Capture exception of Django import on doc build
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-12-03 03:14:12 -04:00
Roberto Rosario
b3e45eac3a Update build string
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-12-03 02:36:07 -04:00
Roberto Rosario
0087ad2adc Bump version to 3.3
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-12-03 02:34:15 -04:00
Roberto Rosario
6b983c66a1 Update release notes
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-12-03 02:29:38 -04:00
Roberto Rosario
063d327254 Update translation files
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-12-03 02:28:33 -04:00
Roberto Rosario
9ba003b01b Enable main menu in small devices
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-12-03 01:05:26 -04:00
Roberto Rosario
bc5f5de629 Merge remote-tracking branch 'origin/versions/micro' into versions/minor
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-30 23:18:50 -04:00
Roberto Rosario
266551c9f3 Update changelog
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-30 23:17:28 -04:00
Roberto Rosario
75d98221b4 Merge branch 'versions/micro' 2019-11-30 23:16:14 -04:00
Roberto Rosario
124d46c9bb Fix off-by-one error in document statistics
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-30 23:15:33 -04:00
Roberto Rosario
6553e68e1b Style cleanups
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-30 23:07:14 -04:00
Roberto Rosario
c3b45c3d61 Add missing migrations
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-30 21:47:51 -04:00
Roberto Rosario
cb8e67d648 Merge remote-tracking branch 'origin/master' into versions/minor
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-30 18:06:29 -04:00
Roberto Rosario
8d55e7d6e9 Merge branch 'patch-1' into 'master'
Add Mayan port variable

See merge request mayan-edms/mayan-edms!61
2019-11-30 22:04:06 +00:00
Roberto Rosario
147318e906 Add substitutions for common URLs
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-30 17:14:42 -04:00
Roberto Rosario
22d6164781 Restructure the development chapter
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-30 16:59:59 -04:00
Roberto Rosario
242330ebaf Tweak the language of the release notes
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-30 16:55:03 -04:00
Sergios Kefalas
e6acd6eb67 Fix also readiness check 2019-11-30 09:30:54 +00:00
Sergios Kefalas
23fbc4166a Add Mayan port variable 2019-11-30 09:19:54 +00:00
Roberto Rosario
6faf30244a Update version 3.3 release notes
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-30 03:01:15 -04:00
Roberto Rosario
d68f8f7349 Fix settings global name
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-30 02:10:58 -04:00
Roberto Rosario
3c8eee05c3 Update installation numbering format
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-29 20:32:56 -04:00
Roberto Rosario
0262cb1324 Move entires from the FAQ to troubleshooting
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-29 20:16:31 -04:00
Roberto Rosario
c11fcbe9f9 Remove unused djangodocs extension
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-29 20:12:27 -04:00
Roberto Rosario
c8701d58c8 Patch footer documentation template
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-29 20:09:46 -04:00
Roberto Rosario
29c06e3f37 Merge remote-tracking branch 'origin/versions/micro' into versions/minor 2019-11-29 19:21:57 -04:00
Roberto Rosario
1cbfb8671c Move funding file to its own folder
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-29 19:02:51 -04:00
Roberto Rosario
28469c7adf Add GitHub funding option
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-29 19:00:02 -04:00
Roberto Rosario
40b040abe8 Minor documentation fixes
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-29 14:32:37 -04:00
Roberto Rosario
c9be1bccd2 Restructure documentation
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-29 14:25:11 -04:00
Roberto Rosario
5493c33257 Merge remote-tracking branch 'origin/versions/micro' into versions/minor
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-28 14:05:15 -04:00
Roberto Rosario
88a96d0150 Update build string
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-28 12:36:07 -04:00
Roberto Rosario
f54caa1ed0 Update translation files
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-28 12:35:09 -04:00
Roberto Rosario
6567ef2238 Update translation files
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-28 11:44:07 -04:00
Roberto Rosario
3b8f376e95 Point releases to the latest
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-28 11:40:13 -04:00
Roberto Rosario
b87db445dd Bump version to 3.2.11
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-28 11:39:30 -04:00
Roberto Rosario
d196f36951 Add 3.2.11 release notes
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-28 11:37:58 -04:00
Roberto Rosario
f4ace36522 Fix test imports
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-28 02:41:44 -04:00
Roberto Rosario
fc3a8f13c6 Merge remote-tracking branch 'origin/versions/micro' into merges/micro_to_minor 2019-11-28 02:24:18 -04:00
Roberto Rosario
85f7167fd4 Style cleanup
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-28 02:11:58 -04:00
Roberto Rosario
e421dbf543 Improve supervisord upgrade instructions
Forum topic 880.

Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-28 01:47:07 -04:00
Roberto Rosario
2d2cc4f75c Fix document check in via the API
- Closes GitLab issue #688. Thanks to inam ul haq (@inam.sys)
  for the report.
- Improve existing tests and add additional check in override tests.

Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-28 01:13:24 -04:00
Roberto Rosario
2119683246 Fix API example
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-27 11:31:16 -04:00
Roberto Rosario
64f02aa771 Merge remote-tracking branch 'origin/versions/micro' into versions/minor
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-27 04:05:06 -04:00
Roberto Rosario
620c23a92e Remove circular index create ACL permission
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-27 03:54:43 -04:00
Roberto Rosario
6687b1e61e Fix reverse inheritance permissions
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-27 03:51:12 -04:00
Roberto Rosario
4ea1a208eb Remove TODO remarks
Converted to entries in the ticket system.

Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-23 12:58:54 -04:00
Roberto Rosario
c9746b5813 Skip redis lock tests for now
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-23 03:32:55 -04:00
Roberto Rosario
5a0f54864e Add document index reset
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-23 02:38:04 -04:00
Roberto Rosario
6d94227224 Update statistics migration to rename duplicates
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-23 02:01:08 -04:00
Roberto Rosario
88ab66749e Self-heal statistics results model
Happens when multiple results are created using the
same slug value. Forum topic 1404.

Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-23 02:00:22 -04:00
Roberto Rosario
a9fdd3e654 Make the statistics slug field unique
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-23 01:59:28 -04:00
Roberto Rosario
9576d5ce17 Update statistics migration to rename duplicates
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-22 21:23:35 -04:00
Roberto Rosario
6ec2fd9e01 Merge remote-tracking branch 'origin/versions/micro' into versions/minor 2019-11-21 02:32:38 -04:00
Roberto Rosario
f3d01a01b2 Import the settings if running from inside Django
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-21 02:31:55 -04:00
Roberto Rosario
31321f8073 Merge remote-tracking branch 'origin/versions/micro' into versions/minor
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-21 02:25:03 -04:00
Roberto Rosario
5defe44420 Allow Python 3 detection when not using Django
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-21 02:24:03 -04:00
Roberto Rosario
a83358069c Merge remote-tracking branch 'origin/versions/micro' into merges/micro_to_minor
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-21 02:20:30 -04:00
Roberto Rosario
ae134ae409 Fix documentation requirements generation
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-21 02:17:17 -04:00
Roberto Rosario
2d5ec1a3cc Add target to make releases easier
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-21 02:11:49 -04:00
Roberto Rosario
96b257a7b8 Remove unused import
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-21 02:06:56 -04:00
Roberto Rosario
3177a7a096 Add pathlib2 to documentation requirements
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-21 02:06:22 -04:00
Roberto Rosario
fc69f41fd0 Style cleanup
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-21 02:05:57 -04:00
Roberto Rosario
f0e04fc069 Add missing db.transaction import
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-21 01:54:22 -04:00
Roberto Rosario
b0729ea714 Update patch_files to work with Python 2 and 3
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-21 01:52:57 -04:00
Roberto Rosario
b5c4c61b3f Add file patching tests to the storages app
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-21 01:46:51 -04:00
Roberto Rosario
3f41d5274b Organize dependencies tests
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-21 01:46:41 -04:00
Roberto Rosario
86399a5ee2 Add book link to the documentation
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-21 01:46:31 -04:00
Roberto Rosario
a36c2a6590 Move the file patching code
Moved from the Dependency class to a generalized utility of the
storages app.

Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-21 01:46:16 -04:00
Roberto Rosario
1e0fa2cdb1 Add file patching tests to the storages app
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-21 00:40:51 -04:00
Roberto Rosario
3c70e7d3e6 Organize dependencies tests
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-21 00:40:05 -04:00
Roberto Rosario
f92058d1b0 Add book link to the documentation
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-21 00:38:03 -04:00
Roberto Rosario
4b383b4951 Move the file patching code
Moved from the Dependency class to a generalized utility of the
storages app.

Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-20 17:33:42 -04:00
Roberto Rosario
45c8fefdc4 Add sphinx sitemap extension
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-20 14:27:54 -04:00
Roberto Rosario
9205c40e9b Automate documentation building dependencies
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-20 14:27:11 -04:00
Roberto Rosario
9981be60da Update changelog
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-20 14:26:05 -04:00
Roberto Rosario
3705457526 Update FAQ entry about the LDAP file
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-20 14:25:25 -04:00
Roberto Rosario
a031e9d582 Update example LDAP authentication settings file
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-20 14:24:35 -04:00
Roberto Rosario
e9ab253757 Add sphinx sitemap extension
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-20 14:22:07 -04:00
Roberto Rosario
3bb07d6dcf Automate documentation building dependencies
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-20 14:08:00 -04:00
Roberto Rosario
448176111b Add Redis based distributed lock backend
- RedisLock backend requires one argument: "redis_url".
  Example: redis://127.0.0.1:6379/0

- Add the setting LOCK_MANAGER_BACKEND_ARGUMENTS.

Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-20 04:40:02 -04:00
Roberto Rosario
97bd91f83e Fix version number in changelog
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-20 00:35:14 -04:00
Roberto Rosario
3b9245c029 Merge remote-tracking branch 'origin/versions/micro' into versions/minor
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-20 00:32:42 -04:00
Roberto Rosario
8c390f6ed7 Update FAQ entry about the LDAP file
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-20 00:31:57 -04:00
Roberto Rosario
af70f881eb Update example LDAP authentication settings file
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-20 00:29:09 -04:00
Roberto Rosario
b5b3312d39 Backport transaction handling to document model events
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-19 14:24:36 -04:00
Roberto Rosario
6b2aeaf421 Merge remote-tracking branch 'origin/versions/micro' into merges/micro_to_minor
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-19 03:38:37 -04:00
Roberto Rosario
b6414e4e92 Copy translation files from versions/micro
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-19 03:30:50 -04:00
Roberto Rosario
8ee9ac239d Add the mysql client in the correct stage
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-19 03:03:21 -04:00
Roberto Rosario
529c567ffb Add the mysql-client package for GitLab CI
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-19 02:32:35 -04:00
Roberto Rosario
f2016a87cb Fix package name typo
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-19 02:04:34 -04:00
Roberto Rosario
17232d6001 Update translation files
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-19 01:50:07 -04:00
Roberto Rosario
128cf09a04 Add missing GitLab CI Ubuntu MySQL package
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-19 01:24:37 -04:00
Roberto Rosario
ce87a8f8d5 Remove build status from README files
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-18 23:48:21 -04:00
Roberto Rosario
5f72e91935 Update release steps
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-18 23:45:58 -04:00
Roberto Rosario
e8da9610db Update build string
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-18 23:42:38 -04:00
Roberto Rosario
b0373eaca1 Bump version to 3.2.10
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-18 23:41:35 -04:00
Roberto Rosario
507b6957c7 PEP8 cleanups
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-18 23:41:09 -04:00
Roberto Rosario
23211847a3 Update language translation files
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-18 23:04:12 -04:00
Roberto Rosario
3137b5a50a Update changelog and release notes
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-18 22:33:16 -04:00
Roberto Rosario
67ea431cca Speed up some tests
Use the small test document.

Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-18 22:19:30 -04:00
Roberto Rosario
f55bf1b52e Improve document signatures tests
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-18 20:59:47 -04:00
Roberto Rosario
3b756c4393 Merge remote-tracking branch 'origin/versions/micro' into merges/micro_to_minor
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-18 17:33:07 -04:00
Roberto Rosario
35aafc3f70 Expand custom Python setting section
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-18 17:13:27 -04:00
Roberto Rosario
cd5da60063 Automate paths in documentation
Paths are now configure in docs/conf.py to ensure
consistency and avoid human error.

Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-18 16:44:07 -04:00
Roberto Rosario
91aec4e3f2 Fix typo
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-18 16:01:53 -04:00
Roberto Rosario
34a9ce6e42 Update OCR API submit URL
Change OCR API submit URL from documents/{pk}/submit
to documents/{pk}/ocr/submit.

Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-18 02:22:29 -04:00
Roberto Rosario
bdc6740131 Remove null statement
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-18 02:21:00 -04:00
Roberto Rosario
e281607ca6 Add document type change API endpoint
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-18 02:20:48 -04:00
Roberto Rosario
cd72a3bab4 Fix failing tests
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-18 01:11:31 -04:00
Roberto Rosario
327c795cf4 Add setting migrations to apps
Add setting migrations for the common, converter, documents,
file metadata, and document signatures app.

Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-18 00:54:02 -04:00
Roberto Rosario
fa8fddb349 Add support for setting migrations
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-18 00:27:33 -04:00
Roberto Rosario
c75033f676 Remove star imports
Remove from the documents.views and permissions.tests modules.

Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-17 02:36:59 -04:00
Roberto Rosario
971e5c0ae7 Prefix dispatch_uid with the app name
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-17 02:19:16 -04:00
Roberto Rosario
f1c704e3e1 Complete prefixing template tags with app names
Additionally remove unused template tags.

Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-17 01:59:17 -04:00
Roberto Rosario
820e997165 Merge remote-tracking branch 'origin/versions/micro' into versions/minor
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-16 22:51:48 -04:00
Roberto Rosario
07e2ca8c11 Update deployment instructions for Python 3
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-16 22:40:34 -04:00
Roberto Rosario
ec86d7679a Add exiftool to deployment installation
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-16 21:40:39 -04:00
Roberto Rosario
707950ad30 Cleanup test models when tests ends
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-16 21:22:40 -04:00
Roberto Rosario
a8097e1869 Adjust margin of JavaScript server error banner
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-16 13:55:17 -04:00
Roberto Rosario
3b0f04add5 Remove database conversion chapter
This command has been removed.

Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-16 13:48:28 -04:00
Roberto Rosario
16d9c7d074 Update docs and template to use 2 Redis databases
Switch default installation to use two Redis databases. One for
the message broker, and the other to store task results.

Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-16 13:45:36 -04:00
Roberto Rosario
fbcd424474 Add MediaBootstrapSetting class
Used for settings that depend on the value
of the MEDIA_ROOT setting.

Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-16 02:47:36 -04:00
Roberto Rosario
76be58dcfa Allow passing the queue list to run_worker
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-16 01:39:03 -04:00
Roberto Rosario
abff91c9f9 Add "run_command" Docker entrypoint option.
Used to run arbitrary Mayan management commands.

Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-16 01:18:29 -04:00
Roberto Rosario
04647bb09c Self-heal statistics results model
Happens when multiple results are created using the
same slug value. Forum topic 1404.

Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-15 22:42:11 -04:00
Roberto Rosario
3562494b9e Make the statistics slug field unique
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-15 22:36:35 -04:00
Roberto Rosario
31e98eec99 Support running specific tests in Docker
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-15 21:49:15 -04:00
Roberto Rosario
ccb59dd1a3 Remove outdated contrib scripts
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-15 21:46:50 -04:00
Roberto Rosario
3951c6c522 Use Python 3 to run Docker tests
The Docker image now uses Python 3.

Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-15 20:24:40 -04:00
Roberto Rosario
3ecbec36aa Update changelog
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-15 19:03:20 -04:00
Roberto Rosario
e2af72dab7 Show placeholder label on invalid action classes
Instead of throwing an error a sample label of
"Unknown action type" will be used and allow users to
delete the unknown state action.

Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-15 19:02:54 -04:00
Roberto Rosario
302a90ff9d Add workflow action to sign documents
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-15 19:02:01 -04:00
Roberto Rosario
3b72eac8ae Show placeholder label on invalid action classes
Instead of throwing an error a sample label of
"Unknown action type" will be used and allow users to
delete the unknown state action.

Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-15 18:49:02 -04:00
Roberto Rosario
27d3661017 Use timezone aware date for document statistics
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-15 17:57:58 -04:00
Roberto Rosario
491badc877 Use timezone aware date for document statistics
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-15 17:56:45 -04:00
Roberto Rosario
4bc27d33e2 Set CELERY_TASK_ALWAYS_EAGER to True in dev
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-15 04:24:06 -04:00
Roberto Rosario
c14a98b78e Add supervisor configuration reread step changes
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-15 02:46:09 -04:00
Roberto Rosario
ecb1e1b0b3 Add supervisor configuration reread step changes
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-15 02:44:53 -04:00
Roberto Rosario
7b96ccfe10 Add missing config file load cache line
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-15 02:33:51 -04:00
Roberto Rosario
72758735c1 Fix Docker BROKER_URL environment variable
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-15 02:30:03 -04:00
Roberto Rosario
bf1155abb3 Add devpi makefile targets
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-15 01:38:43 -04:00
Roberto Rosario
9eb483a052 Add Makefile phony targets
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-15 01:38:25 -04:00
Roberto Rosario
3e954db2f7 Fix sources app logging
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-14 23:53:04 -04:00
Roberto Rosario
783e017470 Fix sources app logging
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-14 23:52:36 -04:00
Roberto Rosario
34c3443cf1 Improve tag app test organization
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-14 23:02:00 -04:00
Roberto Rosario
3f505007fa Fix Docker makefile multiline indentation
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-14 22:48:37 -04:00
Roberto Rosario
bb26df8052 Fix Docker makefile multiline indentation
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-14 22:46:24 -04:00
Roberto Rosario
a308024992 Fix workflow action tests
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-14 00:49:43 -04:00
Roberto Rosario
6473412eca Fix default user for document delete event
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-14 00:40:34 -04:00
Roberto Rosario
fe9bc35d9b Organize autoadmin app tests
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-14 00:40:17 -04:00
Roberto Rosario
c3793699c5 Refactor the initial setting bootstrap code
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-14 00:40:05 -04:00
Roberto Rosario
4a1607afad Add back support for individual database settings
Added for compatibility with version 3.2 settings.

These are now a fallback if the new 'DATABASES'
setting is not specified.

Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-12 15:18:27 -04:00
Roberto Rosario
2e231dad62 Organize smart settings view tests
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-12 13:54:43 -04:00
Roberto Rosario
fac5072c68 Add transaction handling to document model events
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-12 13:48:31 -04:00
Roberto Rosario
8d8fc76962 Add document trashed event
Closes GitLab issue #608. Thanks to Vikas Kedia (@vikaskedia)
for the report.

Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-12 13:46:00 -04:00
Roberto Rosario
77cae991f4 PEP8 cleanups
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-12 01:45:04 -04:00
Roberto Rosario
54dc9469dd Use TemplateField for Index expression field
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-12 01:35:35 -04:00
Roberto Rosario
ec7c3ef41f Improve TemplateWidget JavaScript
Move widget initialization from form to field.

Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-12 01:31:22 -04:00
Roberto Rosario
ba7284a9ae Move TemplateField JS code to a Media class
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-12 01:14:37 -04:00
Roberto Rosario
1a9be24ada Revert "Improve workflow field help text"
There are migrations in version 3.3 before this one.

This reverts commit 1c39b3c84d.
2019-11-12 00:42:59 -04:00
Roberto Rosario
6d8cb8f537 Merge remote-tracking branch 'origin/versions/micro' into merges/micro_to_minor
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-12 00:42:12 -04:00
Roberto Rosario
e593dcb5d8 Add missing Event class cache invalidation
Needed when calling the refresh() method. Otherwise
null StoredEvent instances will be returned.

Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-12 00:23:18 -04:00
Roberto Rosario
a60c2fa94c Add 3.2.10 release notes
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-11 19:25:32 -04:00
Roberto Rosario
41214fa90e Fix NamedMultiWidget issue on Python 3
Affects document checkout form

Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-11 19:21:16 -04:00
Roberto Rosario
f030bae926 Update changelog
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-11 19:20:01 -04:00
Roberto Rosario
1c39b3c84d Improve workflow field help text
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-11 19:19:08 -04:00
Roberto Rosario
774d09479c Add missing ModelProperty label entires
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-11 19:17:33 -04:00
Roberto Rosario
f0755a4cd9 Backport tests improvements
- Test mixin improvements for django_gpg
- Detached and embedded signatures and signing tests for
  the document signatures app.
- Improved mixins in both.

Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-11 19:16:05 -04:00
Roberto Rosario
00ab715829 Fix import order
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-11 18:55:01 -04:00
Roberto Rosario
588ab4c728 Add document checkout view get test
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-11 18:44:25 -04:00
Roberto Rosario
03e4978106 Add target to run specific tests in debug mode
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-11 18:38:50 -04:00
Roberto Rosario
05ceeca8ff Allow multitle expected_content_types in tests
Some tests return 'text/html' or 'text/html; charset=utf-8'
which are essentially the same if they are tested in debug mode.

Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-11 18:37:32 -04:00
Roberto Rosario
8ce4d5fb30 Add target to run all tests in debug mode
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-11 18:36:04 -04:00
Roberto Rosario
15dc4e8489 Organize global substitution code
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-11 18:33:26 -04:00
Roberto Rosario
680a4875f5 Clean up docs config module
- Add substitution for the Mayan EDMS container image version.

Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-11 18:33:07 -04:00
Roberto Rosario
7ff9bcb707 Add support for auto importing dependecies
- No need to use: from .dependencies import *  # NOQA

Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-11 18:31:31 -04:00
Roberto Rosario
08158838b4 Fix NamedMultiWidget issue on Python 3
Affects document checkout form

Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-11 03:00:17 -04:00
Roberto Rosario
466f15e154 Move template sandbox to its own app
Improve UI for the sandbox template textarea.

Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-11 02:59:26 -04:00
Roberto Rosario
81b1564535 Add target to run specific tests in debug mode
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-11 02:25:44 -04:00
Roberto Rosario
5305762636 Add missing ModelProperty label entires
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-11 02:23:16 -04:00
Roberto Rosario
b0677a8bda Allow multitle expected_content_types in tests
Some tests return 'text/html' or 'text/html; charset=utf-8'
which are essentially the same if they are tested in debug mode.

Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-11 02:20:58 -04:00
Roberto Rosario
6bd672a756 Add target to run all tests in debug mode
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-11 02:14:00 -04:00
Roberto Rosario
5af821e155 Add document checkout view get test
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-11 02:12:04 -04:00
Roberto Rosario
04f5952ee6 Add suppor for auto importing dependecies
- No need to use: from .dependencies import *  # NOQA

Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-10 16:53:29 -04:00
Roberto Rosario
cdb1815f49 Add the document template sandbox feature
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-10 03:35:56 -04:00
Roberto Rosario
cf154c46f4 Update form subtemplate button
Will show "Submit" for forms without an instance
and "Save" for forms with an instance. Should be better
than the older behavior of just testing for a template
object.

Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-10 03:34:07 -04:00
Roberto Rosario
bfd4db5d35 Add a query dict argument to common.http.URL
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-10 03:33:27 -04:00
Roberto Rosario
55851d37d6 Fix typo
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-10 01:01:35 -04:00
Roberto Rosario
178d631a1b Organize global substitution code
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-10 01:01:17 -04:00
Roberto Rosario
fa7bc455b9 Clean up docs config module
- Add substitution for the Mayan EDMS container image version.

Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-10 00:43:46 -04:00
Roberto Rosario
1030fd67c9 Update Docker targets to one switch per line
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-10 00:43:18 -04:00
Roberto Rosario
e5c8512104 Remove environment variables from Makefile
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-10 00:42:18 -04:00
Roberto Rosario
d2621c1b70 Update docker chapter
- Add step numbers.
- Add Redis container steps.

Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-10 00:41:32 -04:00
Roberto Rosario
e8aed0e246 Update source language files
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-09 23:43:53 -04:00
Roberto Rosario
da45be77ec Fix app name
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-09 23:34:02 -04:00
Roberto Rosario
d76ec6ffba Add type support to the HTTP POST action timeout
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-09 02:17:15 -04:00
Roberto Rosario
39fe18c332 Add support for proxy model permission inheritance
Proxy models now get the permission inheritance from their base model.

Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-09 02:04:54 -04:00
Roberto Rosario
49017cb3d9 Improve common _create_test_model()
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-09 02:02:17 -04:00
Roberto Rosario
8bf4c7539b Improve TestModelTestMixin
- Allow specifying a base model.
- Fix passing the dynamic Meta class to the test model.

Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-08 20:43:13 -04:00
Roberto Rosario
60dfb71028 Improve workflow runtime link tests
User actual runtime model instance as object for link
resolution.

Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-08 19:49:33 -04:00
Roberto Rosario
ef6abb0af0 Add workflow proxy view tests
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-08 19:37:16 -04:00
Roberto Rosario
f19fd582a1 Use external object mixin in workflow proxy views
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-08 19:36:24 -04:00
Roberto Rosario
dc6b37125f Improve workflow field help text
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-08 19:32:39 -04:00
Roberto Rosario
5e1301b092 Add Docker maintenance command example
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-08 17:26:01 -04:00
Roberto Rosario
8a212df440 Increase DjangoSMTP password field size to 192
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-08 17:25:31 -04:00
Roberto Rosario
c981cf05df Add extra step to push checklist
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-08 15:10:17 -04:00
Roberto Rosario
58a8678833 Allow numbers in makefile targets
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-08 15:07:12 -04:00
Roberto Rosario
8b5f0e9e82 Merge remote-tracking branch 'origin/versions/micro' into versions/minor 2019-11-08 01:11:32 -04:00
Roberto Rosario
f631114cb1 Update changelog
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-08 00:19:39 -04:00
Roberto Rosario
6e1bcae0fe Add fields to the workflow HTTP POST action
Add username, password, and headers fields.
Update the timeout field to support templates.

Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-08 00:18:36 -04:00
Roberto Rosario
e91232f722 Add TestServerTestCaseMixin
Allows performing mocked HTTP requests.

Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-08 00:14:39 -04:00
Roberto Rosario
1615e584ce Rename workflow test module
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-08 00:12:01 -04:00
Roberto Rosario
894db8eb19 Patch Sphinx Include to support substitutions
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-07 04:37:52 -04:00
Roberto Rosario
ffb7be6267 Remove explict Docker image version from docs
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-07 02:47:28 -04:00
Roberto Rosario
656ba26139 Merge branch 'versions/micro' 2019-11-07 02:44:10 -04:00
Roberto Rosario
89bdfc5975 Add debug when loading env config file
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-07 01:39:04 -04:00
Roberto Rosario
fe9d015d0c Add and improve document signatures app tests
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-05 01:52:32 -04:00
Roberto Rosario
f73dd28c92 Update signature API to support uploads
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-05 01:36:00 -04:00
Roberto Rosario
7d4f11b74b Embedded signatures cannot be deleted
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-04 23:43:05 -04:00
Roberto Rosario
3d03d0cd67 PEP8 cleanups
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-04 19:50:01 -04:00
Roberto Rosario
0167ff24b8 Add first set of document signatures API views
Add list, create, detail and edit API views for detached and embedded
signatures.

Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-04 19:46:32 -04:00
Roberto Rosario
d12fa430dc Code style cleanup
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-04 00:12:01 -04:00
Roberto Rosario
dca13b675a Update changelog
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-04 00:11:52 -04:00
Roberto Rosario
eda3a38e7b Update label and icon of the document sign form
Label updated from "Save" to "Sign".

Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-04 00:11:05 -04:00
Roberto Rosario
82e6887b7f Finish spliting duplicated document views
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-03 23:57:34 -04:00
Roberto Rosario
e703d2df10 Split duplicated document views
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-03 23:38:05 -04:00
Roberto Rosario
72b92c3924 Add staging folder "no results" template
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-03 23:23:11 -04:00
Roberto Rosario
07950fa8f3 Merge remote-tracking branch 'origin/versions/micro' into versions/minor 2019-11-03 23:13:12 -04:00
Roberto Rosario
ee426282db Add missing closed issued to release notes
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-03 23:12:46 -04:00
Roberto Rosario
0fdb59b811 Fix typo
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-03 21:31:43 -04:00
Roberto Rosario
52e7559938 Update format of v3.2.9 release notes
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-03 21:26:59 -04:00
Roberto Rosario
c77b677e41 Fix release push command
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-03 20:05:04 -04:00
Roberto Rosario
f1b9ae5ec6 Merge remote-tracking branch 'origin/versions/micro' into versions/minor
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-03 19:55:54 -04:00
Roberto Rosario
2f9062f31a Update releases chapter of documentation
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-03 19:18:45 -04:00
Roberto Rosario
7df930ae4c Update build string
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-03 19:12:09 -04:00
Roberto Rosario
3bd1fb4e90 Bump version to 3.2.9
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-03 19:11:09 -04:00
Roberto Rosario
ac0e74572e Prepare release notes
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-03 19:06:44 -04:00
Roberto Rosario
31b1f72b95 Move django_gpg app mock objects to mocks.py
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-03 18:42:00 -04:00
Roberto Rosario
274937feee Move remaining mocked objects to mocks.py module
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-03 18:36:33 -04:00
Roberto Rosario
565e60a26c Switch CI to mysqlclient
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-02 03:17:16 -04:00
Roberto Rosario
308928ad82 Merge remote-tracking branch 'origin/versions/micro' into versions/minor 2019-11-02 03:16:35 -04:00
Roberto Rosario
a275fb9480 Switch the Docker image to mysqlclient
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-02 03:16:12 -04:00
Roberto Rosario
dcc19e9ffd Switch CI to mysql-python like the Docker image
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-02 03:15:22 -04:00
Roberto Rosario
b544dc8c83 Merge remote-tracking branch 'origin/versions/micro' into merges/micro_to_minor
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-02 02:59:39 -04:00
Roberto Rosario
1252263f93 Add top level config.env file
Update the following elements to use the top level config
environment file:
- CI
- Makefile
- Docker makefile
- Documenation

Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-02 02:15:05 -04:00
Roberto Rosario
0ab9c18733 Add docker install script release checklist step
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-02 02:11:35 -04:00
Roberto Rosario
aa608c6094 Add exception handling to latest version check
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-01 21:41:06 -04:00
Roberto Rosario
f650a623b5 Add book link in the about menu
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-01 21:40:14 -04:00
Roberto Rosario
734b7c25e1 Update change log
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-01 21:30:10 -04:00
Roberto Rosario
e14685e3e7 Rename instances of the IMAP server variable
Renamed from mailbox to server for clarity.

Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-01 21:23:51 -04:00
Roberto Rosario
a507bc89b7 Add extra logging to the IMAP email source
GitLab issue #682. Thanks to Patrick Hütter (@PatrickHuetter)
for the report.

Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-11-01 21:21:24 -04:00
Roberto Rosario
f9fa3344d0 Add savesettings command
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-10-31 13:42:04 -04:00
Roberto Rosario
9d883e455e Add version attribute to namespaces
Also dump the version of all the namespaces as
children of SMART_SETTINGS_NAMESPACES.

Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-10-31 13:41:32 -04:00
Roberto Rosario
1ca91e7ec5 Add cache invalidation test case mixins
Add PermissionTestCaseMixin and SmartSettingTestCaseMixin
to better organize cache invalidation of both apps for
tests.

Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-10-31 12:57:40 -04:00
Roberto Rosario
75d20d1b57 Backport Docker composer makefile targets
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-10-31 12:52:35 -04:00
Roberto Rosario
834697a01e Merge remote-tracking branch 'origin/versions/micro' into versions/minor
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-10-30 20:28:36 -04:00
Roberto Rosario
1e4088c819 Use Docker Alpine variants
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-10-30 20:02:50 -04:00
Roberto Rosario
6dda918bb3 Improve duplicated document list view logic
Don't show documents with trashed duplicates.

Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-10-30 20:01:16 -04:00
Roberto Rosario
58c64955cc Update translation files
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-10-30 20:00:47 -04:00
Roberto Rosario
743c586e31 Update release notes
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-10-30 03:11:28 -04:00
Roberto Rosario
360b3e7c78 Fix repeated argument in Docker instructions
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-10-30 02:56:53 -04:00
Roberto Rosario
9496fffda6 Add target to launch a production staging image
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-10-30 02:55:19 -04:00
Roberto Rosario
c91bab7b1f Fix MAYAN_GUNICORN_TIMEOUT Docker image setting
GitLab issue #671. Thanks to Lennart Sauerbeck (@lennart_s)
for the report.

Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-10-30 02:45:56 -04:00
Roberto Rosario
6dff3564dc Update docker compose file
- Update Mayan EDMS image version to 3.3.
- Fix typos.

Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-10-30 01:07:47 -04:00
Roberto Rosario
475b93a664 Bump version to 3.2.9
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-10-30 00:40:49 -04:00
Roberto Rosario
da7feed2ef Return st_nlink of 1 for mirrored index files
GitLab issue #676. Thanks to Ezio Vernacotola (@eziove) for the
report and solution.

Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-10-29 04:57:27 -04:00
Roberto Rosario
c61acb55ca Update changelog
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-10-29 04:44:31 -04:00
Roberto Rosario
b9244ee62b Improve dependecies tests
Mute output during tests.

Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-10-29 02:57:27 -04:00
Roberto Rosario
ca907c63f6 Move test mixin to its corresponding module
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-10-29 02:42:46 -04:00
Roberto Rosario
5850f2a905 Move Celery and Django Celery dependencies
Both moved to the task manager app.

Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-10-29 02:36:11 -04:00
Roberto Rosario
5dd22f9cf0 Update build string
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-10-29 00:51:03 -04:00
Roberto Rosario
da7a3a02b5 Merge remote-tracking branch 'origin/versions/micro' into versions/minor
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-10-29 00:50:25 -04:00
Roberto Rosario
3d0f139364 Fix failing user management test mixin import
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-10-29 00:42:05 -04:00
Roberto Rosario
b69a5536e2 PEP8 cleanups
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-10-29 00:05:47 -04:00
Roberto Rosario
9c400a6184 Update dependency versions
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-10-29 00:03:41 -04:00
Roberto Rosario
2edacc9a06 Make Postgres container wait delay configurable
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-10-28 23:12:39 -04:00
Roberto Rosario
3bb84fa874 Improve sidebar workflow link activation
Enable the sidebar workflow runtime link when the workflow view
permission is granted to at least one workflow.

Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-10-28 23:10:30 -04:00
Roberto Rosario
8f1d9bd484 Update request code of get_cascade_condition
Add alternate method to obtain the request from the context.

Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-10-28 20:45:14 -04:00
Roberto Rosario
4dd5a63d87 Add workflow runtime link tests
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-10-28 20:44:29 -04:00
Roberto Rosario
de499ab6bd Fix import order
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-10-28 20:44:02 -04:00
Roberto Rosario
d9cb353664 Fix failing user management test mixin import
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-10-28 20:40:41 -04:00
Roberto Rosario
6b4392a35c Update platform command and test for Python 2 & 3
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-10-28 20:40:09 -04:00
Roberto Rosario
61f398a3b9 Update book text
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-10-28 20:38:48 -04:00
Roberto Rosario
20a5369266 Fix typo
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-10-28 20:05:41 -04:00
Roberto Rosario
8e10607d63 Update request code of get_cascade_condition
Add alternate method to obtain the request from the context.

Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-10-28 19:58:54 -04:00
Roberto Rosario
d66231b341 Update ModelPermission declaration order
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-10-28 19:58:08 -04:00
Roberto Rosario
2dc0032fc8 Add workflow runtime link tests
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-10-28 19:57:41 -04:00
Roberto Rosario
356f288d70 Fix import order
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-10-28 19:57:28 -04:00
Roberto Rosario
6e1236e8a0 Fix failing user management test mixin import
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-10-28 03:35:16 -04:00
Roberto Rosario
c46b720e08 Update platform command and test for Python 2 & 3
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-10-28 03:32:36 -04:00
Roberto Rosario
5640b2ac27 Improve sidebar workflow link activation
Enable the sidebar workflow runtime link when the workflow view
permission is granted to at least one workflow.

Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-10-28 01:20:05 -04:00
Roberto Rosario
eb9f905dc8 Update book text
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-10-28 01:08:49 -04:00
Roberto Rosario
bb426a44fc Make Postgres container wait delay configurable
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-10-28 01:00:41 -04:00
Roberto Rosario
e7fec358f3 Split document app links
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-10-28 00:54:57 -04:00
Roberto Rosario
be25705db3 Move all sources mocks to the mocks.py module
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-10-28 00:11:44 -04:00
Roberto Rosario
1bb4689aed Merge remote-tracking branch 'origin/versions/micro' into merges/micro_to_minor
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-10-28 00:06:27 -04:00
Roberto Rosario
deb363ee16 API updates
- Move all generic API classes definitions to the rest_api.generics
module.
- Update API status code on insufficient access for the apps:
indexes, parsing, documents, metadata, ocr, permission,
user management.
- Update API tests.

Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-10-28 00:01:11 -04:00
Roberto Rosario
491de98356 Don't raise error for AnonymousUser permissions
Instead return always False.

Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-10-27 20:12:40 -04:00
Roberto Rosario
7e5aad7714 Backport color log formatter
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-10-27 16:11:16 -04:00
Roberto Rosario
42cfef505c Add target to run all translations targets
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-10-27 16:03:16 -04:00
Roberto Rosario
b2e8a63224 Update language translations files
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-10-27 16:02:16 -04:00
Roberto Rosario
8ab9bf523f Fix platformtemplate command help message
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-10-27 14:53:17 -04:00
Roberto Rosario
115a3cca11 Add tests to the platform app
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-10-27 14:52:19 -04:00
Roberto Rosario
e35c5f6d22 Display message when testing a mailing profile
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-10-27 14:07:12 -04:00
Roberto Rosario
2a16a18984 Move IMAPMockServer to its own module
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-10-27 14:05:37 -04:00
Roberto Rosario
c79a974746 Update changelog
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-10-24 19:30:59 -04:00
Roberto Rosario
cebd43d8c7 Improve IMAPMockServer
Fix failing IMAP source tests.

Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-10-24 19:29:36 -04:00
Roberto Rosario
49b04acda0 Move sources app mock classes to their own module
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-10-24 16:10:18 -04:00
Roberto Rosario
7b03b83dd0 Rename variable mailbox to server for clarity
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-10-24 15:48:47 -04:00
Roberto Rosario
2a501c537a Cleanup documents test mixins
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-10-24 15:45:09 -04:00
Roberto Rosario
83f876cde9 Support simple search disabling
Add new new SEARCH_DISABLE_SIMPLE_SEARCH setting.

Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-10-24 15:24:48 -04:00
Roberto Rosario
d79a24c6ba Update translation files
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-10-24 15:08:23 -04:00
Roberto Rosario
4dea4129db IMAP source improvements
- Support multiple STORE commands. Defaults to +FLAGS (\Deleted)
  to conserve current behavior.
- Support custom search criteria. Defaults to NOT DELETED
  to converse current behavior.
- Support enabling/disabling IMAP expunge command
  after each message. Defaults to True to conserve
  current behavior.
- Increase functionality of the MockIMAPServer

Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-10-24 04:02:25 -04:00
Roberto Rosario
1b6468522a Remove documents.tests.literas __all__ entry
The star import for this has been removed.

Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-10-22 13:14:37 -04:00
Roberto Rosario
dc03a44513 Rename trashed document test mixin for clarity
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-10-22 13:13:53 -04:00
Roberto Rosario
b827155840 Remove explicit expected_content_type
These are now handled by BaseAPITestCase.

Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-10-20 21:09:21 -04:00
Roberto Rosario
1074e6f645 Rename trashed documents test for clarity
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-10-16 20:13:22 -04:00
06c8f68684 debian 9.8 -- tesseract 4
All checks were successful
continuous-integration/drone/push Build is passing
2019-10-14 21:56:36 +02:00
f8bb22df86 added git
Some checks failed
continuous-integration/drone/push Build encountered an error
2019-10-14 21:35:47 +02:00
6ea5a5bd56 use git python mysql
Some checks failed
continuous-integration/drone/push Build is failing
2019-10-14 21:30:01 +02:00
b341386101 try to fix it
Some checks failed
continuous-integration/drone/push Build is failing
2019-10-14 21:24:41 +02:00
7b4cd7ed12 fixed path
Some checks failed
continuous-integration/drone/push Build is failing
2019-10-14 21:17:16 +02:00
7663006e3c use mariadb path
Some checks failed
continuous-integration/drone/push Build is failing
2019-10-14 21:13:55 +02:00
e7159583a8 build mysql with fix
Some checks failed
continuous-integration/drone/push Build is failing
2019-10-14 21:09:21 +02:00
6296101fe6 adde ddrone
Some checks failed
continuous-integration/drone/push Build is failing
2019-10-14 20:56:18 +02:00
9a479ecfeb debian 10 2019-10-14 20:53:05 +02:00
Roberto Rosario
9e2ef57e00 Fix document view test mixin
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-10-13 16:09:54 -04:00
Roberto Rosario
756765ce4a Fix layer imports
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-10-13 15:40:50 -04:00
Roberto Rosario
53096b8bdd Allow "Execute document tools" permission via ACL
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-10-13 15:34:32 -04:00
Roberto Rosario
8aa2567a56 Document tests layout tweaks
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-10-13 15:28:41 -04:00
Roberto Rosario
ce6e568001 Sort documents models methods
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-10-13 15:21:37 -04:00
Roberto Rosario
d1f0e23c53 Test layout updates
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-10-11 11:21:05 -04:00
Roberto Rosario
3f33bdd9c2 Sources apps test updates
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-10-11 10:57:51 -04:00
Roberto Rosario
b2390843ab Update changelog
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-10-10 17:18:39 -04:00
Roberto Rosario
fc14341d40 Update document version upload to use dropzone
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-10-10 17:17:09 -04:00
Roberto Rosario
57dd5b1bca Split source multiform template
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-10-10 17:17:01 -04:00
Roberto Rosario
c731ab7050 Add kwargs and update string formatting
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-10-10 14:50:26 -04:00
Roberto Rosario
bd0d298be3 New document version improvements from clients/bc
- Comment field help text.
- Remove create_document_form_form.
- Use static NewVersionForm.
- Update sources document upload and new version upload view names.

Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-10-10 14:34:50 -04:00
Roberto Rosario
cc8147d002 Update requirements and setup
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-10-08 15:15:50 -04:00
Roberto Rosario
1b327b99f0 Update run_test Docker command name
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-10-08 15:15:08 -04:00
Roberto Rosario
7b3a83ee39 Update GitLab CI to use Python 3 and virtualenv
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-10-08 09:48:54 -04:00
Roberto Rosario
4659269349 Invalidate the layer cache in tests
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-10-08 09:45:28 -04:00
Roberto Rosario
517bb4e9a2 Move Makefile versions to variables
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-10-08 09:45:20 -04:00
Roberto Rosario
162cd256e7 Merge branch 'versions/minor' of gitlab.com:mayan-edms/mayan-edms into versions/minor 2019-10-07 16:43:15 -04:00
Roberto Rosario
339b7dd836 Add missing dependencies import
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-10-07 16:43:00 -04:00
Roberto Rosario
949c0ab285 Remove empty ine
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-10-07 10:43:52 -04:00
Roberto Rosario
cb6cb4121f Fix typos
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-10-06 03:04:45 -04:00
Roberto Rosario
042727aaa9 Update build string
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-10-05 15:09:46 -04:00
Roberto Rosario
5b304ea742 Bump version to 3.3 beta 1
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-10-05 15:08:53 -04:00
Roberto Rosario
ce4413d539 Fix changelog format
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-10-05 03:31:51 -04:00
Roberto Rosario
547c31d216 Fix main menu active link highlight clear
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-10-05 03:28:11 -04:00
Roberto Rosario
f4293a7c06 Add help text to indexing and metadata models
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-10-05 02:47:10 -04:00
Roberto Rosario
1779d482ac Don't add a placeholder help text for functions
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-10-05 02:45:54 -04:00
Roberto Rosario
e0e4f238f6 Keep tooltip icon together with label
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-10-05 02:45:33 -04:00
Roberto Rosario
fecfb37a84 Fix failing tests
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-10-01 23:42:15 -04:00
Roberto Rosario
3e2aaf391e Default the slow worker to 1 process
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-10-01 23:35:05 -04:00
Roberto Rosario
230fde0ab2 Update docker install to deploy a Redis container
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-10-01 23:34:43 -04:00
Roberto Rosario
d9865af200 Update Docker deploy script
- Use alpine postgres version.
- Support Docker networks and make it the default.
- Delete the containers to allow the script to be idempotent.

Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-10-01 22:46:25 -04:00
Roberto Rosario
72f8fcf720 Update test imports
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-10-01 16:10:29 -04:00
Roberto Rosario
30668d9d0b Merge remote-tracking branch 'origin/versions/micro' into feature/merge_with_micro
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-10-01 15:31:32 -04:00
Roberto Rosario
d5aab12b8d Update release chapter instructions
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-10-01 13:35:00 -04:00
Roberto Rosario
32313d2c31 Merge branch 'versions/micro' 2019-10-01 13:33:20 -04:00
Roberto Rosario
ebc0a5f449 Update build string
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-10-01 13:32:38 -04:00
Roberto Rosario
415d3bcd2f Bump version to 3.2.8
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-10-01 13:31:40 -04:00
Roberto Rosario
b985f2ef05 Update changelog and release notes
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-10-01 13:30:28 -04:00
Roberto Rosario
15c953815e Improve linking app tests
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-10-01 00:54:10 -04:00
Roberto Rosario
390e552c1f Update test according to new layout
Separate method making request from TestCase
and into separate TestMixins classes.

Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-09-30 09:35:52 -04:00
Roberto Rosario
9041f00caa Update release notes
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-09-30 05:02:53 -04:00
Roberto Rosario
b0163319eb Improve source tests layout
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-09-29 23:14:33 -04:00
Roberto Rosario
762cdc5b89 Add Chinese fonts to the Docker image
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-09-28 01:52:23 -04:00
Roberto Rosario
396cbb4b22 Add template comment
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-09-27 05:24:21 -04:00
Roberto Rosario
8b0cd93526 Tweak jstree CSS
Remove border radius and remove the column gutter.

Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-09-27 05:23:18 -04:00
Roberto Rosario
f97ccb693b Add test GitLab issue #653
Tests opening zip files containing a non English named member.

Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-09-25 23:00:51 -04:00
Roberto Rosario
c3b539ba19 Add MAYAN_GUNICORN_TIMEOUT documentatoin
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-09-25 22:17:50 -04:00
Roberto Rosario
80126f2326 Update translations
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-09-25 00:07:42 -04:00
Roberto Rosario
00e3d40231 Merge branch 'versions/micro' of gitlab.com:mayan-edms/mayan-edms into versions/micro 2019-09-24 23:29:25 -04:00
Roberto Rosario
0953127420 Use mixin in tag workflow action test
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-09-24 23:29:02 -04:00
Roberto Rosario
02505ba855 Update format of the changelog file
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-09-24 23:19:42 -04:00
Roberto Rosario
6fe41660bd Update release notes
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-09-24 23:11:14 -04:00
Roberto Rosario
7695178992 Fix failing tests
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-09-24 17:17:21 -04:00
Roberto Rosario
b03758ed8b Cleanup OCR app code and link registration
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-09-24 15:37:18 -04:00
Roberto Rosario
d7818b64b0 Support deleting the parsed content of a document
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-09-24 15:36:32 -04:00
Roberto Rosario
fb53726888 Update translations
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-09-24 01:21:02 -04:00
Roberto Rosario
8da1a64410 Add recursive option to Docker entrypoint chown
GitLab issue #668. Thanks to John Wice (@brilthor)
for the report.

Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-09-24 00:24:35 -04:00
Roberto Rosario
62430bf341 Deregister workflow created event from workflows
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-09-24 00:16:41 -04:00
Roberto Rosario
792aa64829 Add OCR content deleted event
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-09-24 00:15:23 -04:00
Roberto Rosario
e62e684107 Simplify DOCTYPE
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-09-23 23:49:47 -04:00
Roberto Rosario
a3d63dce80 Increase maximum scale and enable user scalable
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-09-23 23:45:19 -04:00
Roberto Rosario
8adb342e24 Add alt attribute to most used img tags
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-09-23 23:36:06 -04:00
Roberto Rosario
c9567d0c6d Add support for deleting the OCR content
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-09-23 16:31:04 -04:00
Roberto Rosario
907e2213e9 Update jQuery to version 3.4.1
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-09-23 15:49:58 -04:00
Roberto Rosario
dea3bbdf09 Update Django to version 1.11.24
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-09-23 15:34:09 -04:00
Roberto Rosario
61c6562860 Tweaked the jstree component's appearance
Improve usage with long cabinet labels.
Thanks for forum user @briboe for the report.

Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-09-23 13:58:29 -04:00
Roberto Rosario
8322bd3a27 Rename workflow action test modules
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-09-23 13:23:19 -04:00
Roberto Rosario
11898a36fe Add initial release notes for version 3.2.8
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-09-23 13:20:16 -04:00
Roberto Rosario
2d97024d93 Add cabinet add and remove workflow actions
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-09-23 02:54:52 -04:00
Roberto Rosario
d543a71909 Update document indexing URLs as per v3.3 layout
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-09-23 01:33:23 -04:00
Roberto Rosario
c652a6c7f6 Merge branch 'versions/micro' of gitlab.com:mayan-edms/mayan-edms into versions/micro 2019-09-22 21:16:25 -04:00
Roberto Rosario
1bc3b58d4e Return empty queryset for non authenticated users
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-09-22 21:15:31 -04:00
Roberto Rosario
4e6e4789e3 Update translations
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-09-22 21:15:10 -04:00
Roberto Rosario
d1ba081fb7 Reorganize and speed up document API tests
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-09-22 20:34:37 -04:00
Roberto Rosario
03c63bcf80 Update git branches section
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-09-11 19:27:07 -04:00
Roberto Rosario
f7789fa6da Clean up documentation configuation file
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-09-08 19:38:01 -04:00
Roberto Rosario
d190dbca03 Put file cache label column first
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-09-04 14:53:24 -04:00
Roberto Rosario
4384452423 Update file cache model
Index the name field. Add help texts for maximum size and current
size methods.

Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-09-04 14:53:19 -04:00
Roberto Rosario
0d263c2b76 Update translations
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-09-04 03:00:06 -04:00
Roberto Rosario
76fef4f247 Enable web links app tests
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-08-30 05:23:14 -04:00
Roberto Rosario
f5d0e4d560 Add missing line
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-08-30 05:23:05 -04:00
Roberto Rosario
27228093c0 Merge branch 'versions/micro' 2019-08-28 17:55:21 -04:00
Roberto Rosario
7dda3225b3 Update book links
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-08-27 22:44:11 -04:00
Roberto Rosario
b5ac83767d Add center book image
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-08-27 22:36:24 -04:00
Roberto Rosario
e9231bc47c Add book link to readme
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-08-27 19:31:12 -04:00
2360 changed files with 93694 additions and 60020 deletions

31
.drone.yml Normal file
View File

@@ -0,0 +1,31 @@
kind: pipeline
name: default
steps:
- name: docker
image: plugins/docker
settings:
registry: registry.d1v3.de
repo: registry.d1v3.de/mayan-edms
username:
from_secret: docker_username
password:
from_secret: docker_password
dockerfile: docker/Dockerfile
tags: latest
auto_tag: true
---
kind: secret
name: docker_username
get:
path: kv/data/drone/docker
name: username
---
kind: secret
name: docker_password
get:
path: kv/data/drone/docker
name: token

1
.github/FUNDING.yml vendored Normal file
View File

@@ -0,0 +1 @@
custom: https://www.mayan-edms.com/donation/

2
.gitignore vendored
View File

@@ -33,3 +33,5 @@ static_collected/
google_fonts/
node_modules/
docs/build/
docs/_templates/layout.html
docs/_templates/footer.html

View File

@@ -19,7 +19,7 @@ job_docker_build:
- docker build --pull -t "$CI_REGISTRY_IMAGE" -f docker/Dockerfile .
- VERSION=`cat docker/rootfs/version`
- docker tag "$CI_REGISTRY_IMAGE" "$CI_REGISTRY_IMAGE:$VERSION"
- docker run --rm "$CI_REGISTRY_IMAGE:$VERSION" run-tests
- 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"
@@ -58,7 +58,7 @@ job_docker_nightly:
- 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 run --rm "$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG" run_tests
- docker push "$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG"
only:
- nightly
@@ -152,7 +152,9 @@ job_push_python:
- 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 exiftool gcc ghostscript gnupg1 graphviz libfuse2 libjpeg-dev libmagic1 libpng-dev libtiff-dev poppler-utils libreoffice poppler-utils python-dev python-pip tesseract-ocr tesseract-ocr-deu
- apt-get install -qq curl exiftool firefox-geckodriver gcc ghostscript gnupg1 graphviz libfuse2 libjpeg-dev libmagic1 libpng-dev libtiff-dev poppler-utils libreoffice poppler-utils python-dev python-virtualenv python3-dev tesseract-ocr tesseract-ocr-deu
- virtualenv venv -p /usr/bin/python3
- . venv/bin/activate
- pip install -r requirements.txt -r requirements/testing-base.txt
only:
- releases/all
@@ -169,8 +171,10 @@ test-mysql:
services:
- mysql:8.0.3
script:
- apt-get install -qq libmysqlclient-dev mysql-client
- pip install mysqlclient
- apt-get install -qq libmysqlclient-dev libssl-dev mysql-client
- . venv/bin/activate
- set -a && . ./config.env && set +a
- pip install mysqlclient==$PYTHON_MYSQL_VERSION
- 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:
@@ -185,7 +189,9 @@ test-postgres:
- postgres
script:
- apt-get install -qq libpq-dev
- pip install psycopg2
- . venv/bin/activate
- set -a && . ./config.env && set +a
- pip install psycopg2==$PYTHON_PSYCOPG2_VERSION
- python manage.py test --mayan-apps --settings=mayan.settings.testing.gitlab-ci.db_postgres --nomigrations
tags:
- postgres
@@ -193,6 +199,7 @@ test-postgres:
test-sqlite:
<<: *test_base
script:
- . venv/bin/activate
- python manage.py test --mayan-apps --settings=mayan.settings.testing.gitlab-ci --nomigrations
deploy_demo:

View File

@@ -223,15 +223,21 @@ source_lang = en
source_file = mayan/apps/task_manager/locale/en/LC_MESSAGES/django.po
type = PO
[mayan-edms.templating-3-0]
file_filter = mayan/apps/templating/locale/<lang>/LC_MESSAGES/django.po
source_lang = en
source_file = mayan/apps/templating/locale/en/LC_MESSAGES/django.po
type = PO
[mayan-edms.user_management-2-0]
file_filter = mayan/apps/user_management/locale/<lang>/LC_MESSAGES/django.po
source_lang = en
source_file = mayan/apps/user_management/locale/en/LC_MESSAGES/django.po
type = PO
[mayan-edms.weblink-3-0]
file_filter = mayan/apps/weblinks/locale/<lang>/LC_MESSAGES/django.po
[mayan-edms.web_link-3-0]
file_filter = mayan/apps/web_links/locale/<lang>/LC_MESSAGES/django.po
source_lang = en
source_file = mayan/apps/weblinks/locale/en/LC_MESSAGES/django.po
source_file = mayan/apps/web_links/locale/en/LC_MESSAGES/django.po
type = PO

View File

@@ -4,21 +4,25 @@ Contributing to Mayan EDMS
Issues
------
- Before submitting a new issue, check for **open issues** first and join the
discussion.
- The issue system is for reporting problems with the program code. For
questions use the forum at: https://forum.mayan-edms.com/
- Do not open issues asking for **support or consulting**. For paid support
and consultation visit: https://www.mayan-edms.com/support/
- The issue must be related to the code only, do not open issues for problems
with databases, deployments, webservers, cloud providers, etc.
- Before submitting a new issue, check for **existing issues** first and
join the discussion.
- If your issue is not attended in a while, **be patient**, the core team is
small and the codebase big.
- Try to reproduce the issue using a **separate, clean installation**, sometimes
the issue can be caused by an error in a configuration file and not with the
code itself.
- **Do not upload** sensitive, private or classified information or files with
your issue. If the issue is triggered by a user file, create a dummy file with the
same properties that can trigger the issue and upload that file instead.
- Try to reproduce the issue using a **separate, clean installation**,
sometimes the issue can be caused by an error in a configuration file and
not with the code itself.
- **Do not upload** sensitive, private or classified information or files
with your issue. If the issue is triggered by a user file, create a dummy
file with the same properties that can trigger the issue and upload that
file instead.
- Add steps that trigger the issue in a **repeatable manner**.
- **Screenshots** go a long way in helping understand problems.
- The issue must be related to the code only, do not open issues for problems
with deployments, webservers, cloud providers, etc.
- Do not open issues asking for **support or consulting**.
Code
----

File diff suppressed because it is too large Load Diff

View File

@@ -1,8 +1,11 @@
.PHONY: clean-pyc clean-build
#!make
include config.env
.PHONY: clean clean-pyc clean-build test
help:
@echo "Usage: make <target>\n"
@awk 'BEGIN {FS = ":.*##"} /^[a-zA-Z_-]+:.*?## / { printf " * %-40s -%s\n", $$1, $$2 }' $(MAKEFILE_LIST)|sort
@awk 'BEGIN {FS = ":.*##"} /^[0-9a-zA-Z_-]+:.*?## / { printf " * %-40s -%s\n", $$1, $$2 }' $(MAKEFILE_LIST)|sort
# Cleaning
@@ -18,7 +21,7 @@ clean-pyc: ## Remove Python artifacts.
find . -name '*.pyc' -exec rm -f {} +
find . -name '*.pyo' -exec rm -f {} +
find . -name '*~' -exec rm -f {} +
find . -name '__pycache__' -exec rm -R -f {} +
find . -name '__pycache__' -exec rm -R -f {} +
# Testing
@@ -26,17 +29,25 @@ test: clean-pyc
test: ## MODULE=<python module name> - Run tests for a single app, module or test class.
./manage.py test $(MODULE) --settings=mayan.settings.testing.development --nomigrations $(ARGUMENTS)
test-debug: clean-pyc
test-debug: ## MODULE=<python module name> - Run tests for a single app, module or test class, in debug mode.
./manage.py test $(MODULE) --settings=mayan.settings.testing.development --nomigrations --debug-mode $(ARGUMENTS)
test-all: ## Run all tests.
test-all: clean-pyc
./manage.py test --mayan-apps --settings=mayan.settings.testing.development --nomigrations $(ARGUMENTS)
test-all-debug: ## Run all tests in debug mode.
test-all-debug: clean-pyc
./manage.py test --mayan-apps --settings=mayan.settings.testing.development --nomigrations --debug-mode $(ARGUMENTS)
test-launch-postgres:
@docker rm -f test-postgres || true
@docker volume rm test-postgres || true
docker run -d --name test-postgres -p 5432:5432 -v test-postgres:/var/lib/postgresql/data healthcheck/postgres
docker run -d --name test-postgres -p 5432:5432 -v test-postgres:/var/lib/postgresql/data $(DOCKER_POSTGRES_IMAGE_VERSION)
sudo apt-get install -q libpq-dev
pip install psycopg2
while ! docker inspect --format='{{json .State.Health}}' test-postgres|grep 'Status":"healthy"'; do sleep 1; done
pip install psycopg2==$(PYTHON_PSYCOPG2_VERSION)
while ! nc -z 127.0.0.1 5432; do sleep 1; done
test-with-postgres: ## MODULE=<python module name> - Run tests for a single app, module or test class against a Postgres database container.
test-with-postgres: test-launch-postgres
@@ -53,10 +64,10 @@ test-with-postgres-all: test-launch-postgres
test-launch-mysql:
@docker rm -f test-mysql || true
@docker volume rm test-mysql || true
docker run -d --name test-mysql -p 3306:3306 -e MYSQL_ALLOW_EMPTY_PASSWORD=True -e MYSQL_DATABASE=mayan -v test-mysql:/var/lib/mysql healthcheck/mysql
docker run -d --name test-mysql -p 3306:3306 -e MYSQL_ALLOW_EMPTY_PASSWORD=True -e MYSQL_DATABASE=mayan -v test-mysql:/var/lib/mysql $(DOCKER_MYSQL_IMAGE_VERSION)
sudo apt-get install -q libmysqlclient-dev mysql-client
pip install mysqlclient
while ! docker inspect --format='{{json .State.Health}}' test-mysql|grep 'Status":"healthy"'; do sleep 1; done
pip install mysqlclient==$(PYTHON_MYSQL_VERSION)
while ! nc -z 127.0.0.1 3306; do sleep 1; done
mysql -h 127.0.0.1 -P 3306 -uroot -e "set global character_set_server=utf8mb4;"
test-with-mysql: ## MODULE=<python module name> - Run tests for a single app, module or test class against a MySQL database container.
@@ -75,9 +86,9 @@ test-with-mysql-all: test-launch-mysql
test-launch-oracle:
@docker rm -f test-oracle || true
@docker volume rm test-oracle || true
docker run -d --name test-oracle -p 49160:22 -p 49161:1521 -e ORACLE_ALLOW_REMOTE=true -v test-oracle:/u01/app/oracle wnameless/oracle-xe-11g
docker run -d --name test-oracle -p 49160:22 -p 49161:1521 -e ORACLE_ALLOW_REMOTE=true -v test-oracle:/u01/app/oracle $(DOCKER_ORACLE_IMAGE_VERSION)
# https://gist.github.com/kimus/10012910
pip install cx_Oracle
pip install cx_Oracle==$(PYTHON_ORACLE_VERSION)
while ! nc -z 127.0.0.1 49161; do sleep 1; done
sleep 10
@@ -115,6 +126,9 @@ translations-push: ## Upload all translation files to Transifex.
translations-pull: ## Download all translation files from Transifex.
tx pull -f
translations-all: ## Execute all translations targets.
translations-all: translations-make translations-push translations-pull translations-compile
# Releases
increase-version: ## Increase the version number of the entire project's files.
@@ -227,10 +241,40 @@ generate-setup: generate-requirements
generate-requirements: ## Generate all requirements files from the project depedency declarations.
@./manage.py generaterequirements build > requirements/build.txt
@./manage.py generaterequirements development > requirements/development.txt
@./manage.py generaterequirements documentation > requirements/documentation.txt
@./manage.py generaterequirements production --only=pathlib2 >> requirements/documentation.txt
@./manage.py generaterequirements testing > requirements/testing-base.txt
@./manage.py generaterequirements production --exclude=django > requirements/base.txt
@./manage.py generaterequirements production --only=django > requirements/common.txt
gitlab-release-documentation: ## Trigger the documentation build and publication using GitLab CI
gitlab-release-documentation:
git push
git push --tags
git push origin :releases/documentation || true
git push origin HEAD:releases/documentation
gitlab-release-docker: ## Trigger the Docker image build and publication using GitLab CI
gitlab-release-docker:
git push
git push --tags
git push origin :releases/docker || true
git push origin HEAD:releases/docker
gitlab-release-python: ## Trigger the Python package build and publication using GitLab CI
gitlab-release-python:
git push
git push --tags
git push origin :releases/python || true
git push origin HEAD:releases/python
gitlab-release-all: ## Trigger the Python package, Docker image, and documentation build and publication using GitLab CI
gitlab-release-all:
git push
git push --tags
git push origin :releases/all || true
git push origin HEAD:releases/all
# Dev server
runserver: ## Run the development server.
@@ -243,11 +287,12 @@ shell_plus: ## Run the shell_plus command.
./manage.py shell_plus --settings=mayan.settings.development
test-with-docker-services-on: ## Launch and initialize production-like services using Docker (Postgres and Redis).
docker run -d --name redis -p 6379:6379 redis
docker run -d --name postgres -p 5432:5432 postgres
docker run -d --name redis -p 6379:6379 $(DOCKER_REDIS_IMAGE_VERSION)
docker run -d --name postgres -p 5432:5432 $(DOCKER_POSTGRES_IMAGE_VERSION)
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 4
pip install psycopg2==$(PYTHON_PSYCOPG2_VERSION) redis==$(PYTHON_REDIS_VERSION)
./manage.py initialsetup --settings=mayan.settings.staging.docker
test-with-docker-services-off: ## Stop and delete the Docker production-like services.
@@ -261,7 +306,7 @@ test-with-docker-worker: ## Launch a worker instance that uses the production-li
DJANGO_SETTINGS_MODULE=mayan.settings.staging.docker ./manage.py celery worker -A mayan -B -l INFO -O fair
docker-mysql-on: ## Launch and initialize a MySQL Docker container.
docker run -d --name mysql -p 3306:3306 -e MYSQL_ALLOW_EMPTY_PASSWORD=True -e MYSQL_DATABASE=mayan_edms mysql
docker run -d --name mysql -p 3306:3306 -e MYSQL_ALLOW_EMPTY_PASSWORD=True -e MYSQL_DATABASE=mayan_edms $(DOCKER_MYSQL_IMAGE_VERSION)
while ! nc -z 127.0.0.1 3306; do sleep 1; done
docker-mysql-off: ## Stop and delete the MySQL Docker container.
@@ -269,7 +314,7 @@ docker-mysql-off: ## Stop and delete the MySQL Docker container.
docker rm mysql
docker-postgres-on: ## Launch and initialize a PostgreSQL Docker container.
docker run -d --name postgres -p 5432:5432 postgres
docker run -d --name postgres -p 5432:5432 $(DOCKER_POSTGRES_IMAGE_VERSION)
while ! nc -z 127.0.0.1 5432; do sleep 1; done
docker-postgres-off: ## Stop and delete the PostgreSQL Docker container.

View File

@@ -1,6 +1,5 @@
[![Donation](https://img.shields.io/badge/donation-PayPal-brightgreen)](https://paypal.me/MayanEDMS)
[![pypi][pypi]][pypi-url]
[![builds][builds]][builds-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/)
@@ -45,7 +44,7 @@
<h2 align="center">Book</h2>
The pre-release version of the book "Exploring Mayan EDMS" available now at a discounted price!
The final version of the book "Exploring Mayan EDMS" available now!
<p align="center">
<a href="https://sellfy.com/p/um2fkx/">
@@ -53,8 +52,6 @@ The pre-release version of the book "Exploring Mayan EDMS" available now at a di
</a>
</p>
Limited quantities. Buyers of the pre-release will get the full version for free when it is ready.
The link is https://sellfy.com/p/um2fkx/
<h2 align="center">Installation</h2>

View File

@@ -1,4 +1,4 @@
|donation| |pypi| |builds| |coverage| |python| |license| |docker_pulls| |docker_stars| |docker_layers|
|donation| |pypi| |coverage| |python| |license| |docker_pulls| |docker_stars| |docker_layers|
.. image:: https://gitlab.com/mayan-edms/mayan-edms/raw/master/docs/_static/mayan_logo.png
@@ -25,14 +25,13 @@ at: https://docs.mayan-edms.com/topics/installation.html
.. _Docker: https://www.docker.com/
The pre-release version of the book "Exploring Mayan EDMS" available now at a discounted price!
The final version of the book "Exploring Mayan EDMS" available now!
.. image:: https://camo.githubusercontent.com/89d2fe787507c9247aa7bb406e2682b53eb7a5f9/68747470733a2f2f64313273776274773731397934732e636c6f756466726f6e742e6e65742f696d616765732f76365270785734302f615030714b4c6a6b50694175585a6859754234352f774441554c417a4679782e6a7065673f773d353438
:align: center
:width: 300
:target: https://sellfy.com/p/um2fkx/
Limited quantities. Buyers of the pre-release will get the full version for free when it is ready.
Click the image or visit: https://sellfy.com/p/um2fkx/
Hardware requirements

16
config.env Normal file
View File

@@ -0,0 +1,16 @@
DOCKER_MYSQL_IMAGE_VERSION=mysql:8.0
DOCKER_ORACLE_IMAGE_VERSION=wnameless/oracle-xe-11g
DOCKER_POSTGRES_IMAGE_VERSION=postgres:9.6-alpine
DOCKER_RABBITMQ_IMAGE_VERSION=rabbitmq:3-alpine
DOCKER_REDIS_IMAGE_VERSION=redis:5.0-alpine
PYTHON_AMQP_VERSION=2.5.2
PYTHON_FLOWER_VERSION=0.9.3
PYTHON_LIBRABBITMQ_VERSION=2.0.0
PYTHON_MYSQL_VERSION=1.4.4
PYTHON_ORACLE_VERSION=7.2.3
PYTHON_PSYCOPG2_VERSION=2.8.3
PYTHON_PSUTIL_VERSION=5.6.2
PYTHON_REDIS_VERSION=3.2.1
SOURCE_CODE_REPOSITORY=https://gitlab.com/mayan-edms/mayan-edms/
SOURCE_CODE_GIT=https://gitlab.com/mayan-edms/mayan-edms.git
SOURCE_CODE_ISSUES=https://gitlab.com/mayan-edms/mayan-edms/issues/

View File

@@ -1,10 +0,0 @@
#!/bin/sh
export DEBIAN_FRONTEND=noninteractive
apt-get update
apt-get install -y --no-install-recommends tesseract-ocr-deu
$MAYAN_PIP_BIN install -r ${MAYAN_INSTALL_DIR}/requirements-testing.txt
$MAYAN_BIN test --mayan-apps --settings=mayan.settings.testing

View File

@@ -1,25 +0,0 @@
!/bin/bash
Directories[0]="."
# Setup find correctly.
export IFS=$'\n'
# Loop through our array.
for x in ${Directories[@]}
do
# Find all directories & subdirectories
for i in $(find $x -type d)
do
# Fix Permissions
chmod -c 775 $i
chown -c www-data:www-data $i
done
# Find all Files
for i in $(find $x -type f)
do
# Fix Permissions
chmod -c 664 $i
chown -c www-data:www-data $i
done
done

View File

@@ -5,24 +5,30 @@ set -e
# $ 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
# NOTE: Before executing, 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}
: ${USE_DOCKER_NETWORK:=true}
: ${DOCKER_NETWORK_NAME:=mayan}
: ${DATABASE_USER:=mayan}
: ${DATABASE_NAME:=mayan}
: ${DATABASE_PASSWORD:=mayanuserpass}
: ${DOCKER_POSTGRES_IMAGE:=postgres:9.6}
: ${DOCKER_POSTGRES_IMAGE:=postgres:9.6-alpine}
: ${DOCKER_POSTGRES_CONTAINER:=mayan-edms-postgres}
: ${DOCKER_POSTGRES_VOLUME:=/docker-volumes/mayan-edms/postgres}
: ${DOCKER_POSTGRES_PORT:=5432}
: ${DOCKER_POSTGRES_DELAY:=10}
: ${DOCKER_REDIS_IMAGE:=redis:5.0-alpine}
: ${DOCKER_REDIS_CONTAINER:=mayan-edms-redis}
: ${DOCKER_REDIS_PORT:=6379}
: ${DOCKER_MAYAN_IMAGE:=mayanedms/mayanedms:latest}
: ${DOCKER_MAYAN_CONTAINER:=mayan-edms}
: ${DOCKER_MAYAN_VOLUME:=/docker-volumes/mayan-edms/media}
: ${DOCKER_MAYAN_PORT:=80}
cat << EOF
@@ -44,6 +50,8 @@ echo "Variable values to be used:"
echo "---------------------------"
echo "INSTALL_DOCKER: $INSTALL_DOCKER"
echo "DELETE_VOLUMES: $DELETE_VOLUMES"
echo "USE_DOCKER_NETWORK: $USE_DOCKER_NETWORK"
echo "DOCKER_NETWORK_NAME: $DOCKER_NETWORK_NAME"
echo "DATABASE_USER: $DATABASE_USER"
echo "DATABASE_NAME: $DATABASE_NAME"
echo "DATABASE_PASSWORD: $DATABASE_PASSWORD"
@@ -51,10 +59,19 @@ 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_POSTGRES_DELAY: $DOCKER_POSTGRES_DELAY"
echo "DOCKER_REDIS_IMAGE: $DOCKER_REDIS_IMAGE"
echo "DOCKER_REDIS_CONTAINER: $DOCKER_REDIS_CONTAINER"
echo "DOCKER_REDIS_PORT: $DOCKER_REDIS_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."
echo "DOCKER_MAYAN_PORT: $DOCKER_MAYAN_PORT"
echo
echo "Override any of them by setting them before the script. "
echo "Example: INSTALL_DOCKER=true sh get-mayan-edms.sh"
echo "\nStarting in 10 seconds. Press CTRL+C to cancel."
sleep 10
fi
@@ -72,33 +89,62 @@ if [ -z `which docker` ]; then
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
docker rm -f $DOCKER_REDIS_CONTAINER >/dev/null 2>&1 || true
docker rm -f $DOCKER_POSTGRES_CONTAINER >/dev/null 2>&1 || true
docker rm -f $DOCKER_MAYAN_CONTAINER >/dev/null 2>&1 || true
echo "Done"
if [ "$DELETE_VOLUMES" = true ]; then
echo -n "* Deleting Docker volumes in 5 seconds (warning: this delete all document data)..."
echo -n "* Deleting Docker volumes in 5 seconds (warning: this will delete all document data). Press CTRL+C to cancel..."
sleep 5
true || rm DOCKER_MAYAN_VOLUME -Rf
true || rm DOCKER_POSTGRES_VOLUME -Rf
rm DOCKER_MAYAN_VOLUME -Rf || true
rm DOCKER_POSTGRES_VOLUME -Rf || true
echo "Done"
fi
echo -n "* Pulling (downloading) the Mayan EDMS Docker image..."
docker pull $DOCKER_MAYAN_IMAGE >/dev/null
echo -n "* Pulling (downloading) the Redis Docker image..."
docker pull $DOCKER_REDIS_IMAGE > /dev/null
echo "Done"
echo -n "* Pulling (downloading) the PostgreSQL Docker image..."
docker pull $DOCKER_POSTGRES_IMAGE > /dev/null
echo "Done"
echo -n "* Pulling (downloading) the Mayan EDMS Docker image..."
docker pull $DOCKER_MAYAN_IMAGE >/dev/null
echo "Done"
if [ "$USE_DOCKER_NETWORK" = true ]; then
echo -n "* Creating Docker network..."
docker network create $DOCKER_NETWORK_NAME 2> /dev/null || true
# Ignore error if the network already exists
echo "Done"
fi
if [ "$USE_DOCKER_NETWORK" = true ]; then
NETWORK_ARGUMENT="--network=$DOCKER_NETWORK_NAME"
POSTGRES_PORT_ARGUMENT=""
REDIS_PORT_ARGUMENT=""
MAYAN_DATABASE_PORT_ARGUMENT=""
MAYAN_DATABASE_HOST_ARGUMENT="-e MAYAN_DATABASE_HOST=$DOCKER_POSTGRES_CONTAINER"
MAYAN_CELERY_BROKER_URL_ARGUMENT="-e MAYAN_CELERY_BROKER_URL=redis://$DOCKER_REDIS_CONTAINER:6379/0"
MAYAN_CELERY_RESULT_BACKEND_ARGUMENT="-e MAYAN_CELERY_RESULT_BACKEND=redis://$DOCKER_REDIS_CONTAINER:6379/1"
else
NETWORK_ARGUMENT=""
POSTGRES_PORT_ARGUMENT="-e $DOCKER_POSTGRES_PORT:5432"
REDIS_PORT_ARGUMENT="-e $DOCKER_REDIS_PORT:6379"
MAYAN_DATABASE_PORT_ARGUMENT="-e MAYAN_DATABASE_PORT=$DOCKER_POSTGRES_PORT"
MAYAN_DATABASE_HOST_ARGUMENT="-e MAYAN_DATABASE_HOST=172.17.0.1"
MAYAN_CELERY_BROKER_URL_ARGUMENT="-e MAYAN_CELERY_BROKER_URL=redis://172.17.0.1:6379/0"
MAYAN_CELERY_RESULT_BACKEND_ARGUMENT="-e MAYAN_CELERY_RESULT_BACKEND=redis://172.17.0.1:6379/1"
fi
echo -n "* Deploying the PostgreSQL container..."
docker run -d \
--name $DOCKER_POSTGRES_CONTAINER \
$NETWORK_ARGUMENT \
--restart=always \
-p $DOCKER_POSTGRES_PORT:5432 \
$POSTGRES_PORT_ARGUMENT \
-e POSTGRES_USER=$DATABASE_USER \
-e POSTGRES_DB=$DATABASE_NAME \
-e POSTGRES_PASSWORD=$DATABASE_PASSWORD \
@@ -106,26 +152,47 @@ docker run -d \
$DOCKER_POSTGRES_IMAGE >/dev/null
echo "Done"
echo -n "* Waiting for the PostgreSQL container to be ready (10 seconds)..."
sleep 10
echo -n "* Deploying the Redis container..."
docker run -d \
--name $DOCKER_REDIS_CONTAINER \
$NETWORK_ARGUMENT \
--restart=always \
$REDIS_PORT_ARGUMENT \
$DOCKER_REDIS_IMAGE \
redis-server \
--appendonly no \
--databases 2 \
--maxmemory 100mb \
--maxmemory-policy allkeys-lru \
--maxclients 500 \
--save "" \
--tcp-backlog 256 \
>/dev/null
echo "Done"
echo -n "* Waiting for the PostgreSQL container to be ready (${DOCKER_POSTGRES_DELAY} seconds)..."
sleep $DOCKER_POSTGRES_DELAY
echo "Done"
echo -n "* Deploying Mayan EDMS container..."
docker run -d \
--name $DOCKER_MAYAN_CONTAINER \
$NETWORK_ARGUMENT \
--restart=always \
-p 80:8000 \
-p $DOCKER_MAYAN_PORT:8000 \
-e MAYAN_DATABASE_ENGINE=django.db.backends.postgresql \
-e MAYAN_DATABASE_HOST=172.17.0.1 \
$MAYAN_DATABASE_HOST_ARGUMENT \
$MAYAN_DATABASE_PORT_ARGUMENT \
-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=0 \
$MAYAN_CELERY_BROKER_URL_ARGUMENT \
$MAYAN_CELERY_RESULT_BACKEND_ARGUMENT \
-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;
while ! curl --output /dev/null --silent --head --fail http://localhost:$DOCKER_MAYAN_PORT; do sleep 1 && echo -n .; done;
echo "Done"

View File

@@ -17,8 +17,8 @@ APP_LIST = (
'file_metadata', 'linking', 'lock_manager', 'mailer',
'mayan_statistics', 'metadata', 'mirroring', 'motd', 'navigation',
'ocr', 'permissions', 'platform', 'rest_api', 'smart_settings',
'sources', 'storage', 'tags', 'task_manager', 'user_management',
'weblinks'
'sources', 'storage', 'tags', 'task_manager', 'templating',
'user_management', 'web_links'
)
LANGUAGE_LIST = (

View File

@@ -1,64 +1,139 @@
from __future__ import absolute_import
# Install Python LDAP with:
# $ pip install python-ldap
# or if using Docker, pass the environment variable MAYAN_PIP_INSTALLS:
# -e MAYAN_PIP_INSTALLS=python-ldap
import ldap
from django_auth_ldap.config import LDAPSearch
from .base import * # NOQA
from django.contrib.auth import get_user_model
from django_auth_ldap.config import (
LDAPSearch, LDAPSearchUnion, NestedActiveDirectoryGroupType
)
SECRET_KEY = '<your secret key>'
from mayan.settings.production import *
# makes sure this works in Active Directory
ldap.set_option(ldap.OPT_REFERRALS, 0)
# Makes sure this works in Active Directory
ldap.set_option(ldap.OPT_REFERRALS, False)
# This is the default, but I like to be explicit.
# Turn of debug output, turn this off when everything is working as expected
ldap.set_option(ldap.OPT_DEBUG_LEVEL, 1)
# Default: True
AUTH_LDAP_ALWAYS_UPDATE_USER = True
LDAP_USER_AUTO_CREATION = "False"
LDAP_URL = "ldap://<your ldap server IP>:389/"
LDAP_BASE_DN = "dc=paramatrix,dc=co,dc=in"
LDAP_ADDITIONAL_USER_DN = "dc=people"
LDAP_ADMIN_DN = ""
LDAP_PASSWORD = ""
# Use TLS to talk to the LDAP server
# Requires acquiring the server's certificate
# $ openssl s_client -connect <LDAP server>:636
# Part of the output of this file will be the Base-64 encoded .cer file
# that was presented for LDAPS. Cut and paste into a file beginning at
# "-Begin Certificate" through "-End Certificate--" and save as a .crt, for
# example: ldapserver.crt
# $ CERT=ldapserver.crt
# $ cp /root/$CERT /usr/share/ca-certificates/$CERT
# # notice the + sign which tells to activate the certificate.
# $ echo "+$CERT" >/etc/ca-certificates/update.d/activate_my_cert
# $ dpkg-reconfigure ca-certificates;
AUTH_LDAP_START_TLS = False
LDAP_ADDITIONAL_USER_DN = 'dc=people'
LDAP_ADMIN_DN = ''
LDAP_BASE_DN = 'dc=<top level dc>,dc=co,dc=in'
LDAP_PASSWORD = ''
LDAP_USER_AUTO_CREATION = 'False'
LDAP_URL = 'ldap://<LDAP server>:389/'
AUTH_LDAP_SERVER_URI = LDAP_URL
AUTH_LDAP_BIND_DN = LDAP_ADMIN_DN
AUTH_LDAP_BIND_PASSWORD = LDAP_PASSWORD
AUTH_LDAP_SERVER_URI = LDAP_URL
# Simple search
AUTH_LDAP_USER_SEARCH = LDAPSearch(
'%s,%s' % (LDAP_ADDITIONAL_USER_DN, LDAP_BASE_DN),
ldap.SCOPE_SUBTREE, '(uid=%(user)s)'
)
# If you need to search in more than one place for a user, you can use
# LDAPSearchUnion. This takes multiple LDAPSearch objects and returns the
# union of the results. The precedence of the underlying searches is
# unspecified.
# https://django-auth-ldap.readthedocs.io/en/latest/authentication.html
# AUTH_LDAP_USER_SEARCH = LDAPSearchUnion(
# LDAPSearch(
# 'ou=Users,ou=Admin,dc=<top level DC>,dc=local', ldap.SCOPE_SUBTREE,
# '(samaccountname=%(user)s)'
# ),
# LDAPSearch(
# 'ou=Users,ou=<second OU>,dc=<top level DC>,dc=local',
# ldap.SCOPE_SUBTREE, '(samaccountname=%(user)s)'
# ),
# LDAPSearch(
# 'ou=Users,ou=<third OU>,dc=<top level DC>,dc=local',
# ldap.SCOPE_SUBTREE, '(samaccountname=%(user)s)'
# ),
# )
# User attributes to map from LDAP to Mayan's user model.
AUTH_LDAP_USER_ATTR_MAP = {
'first_name': 'cn',
'last_name': 'sn',
'email': 'mail'
}
# Another example map
# AUTH_LDAP_USER_ATTR_MAP = {
# 'username': 'sAMAccountName',
# 'first_name': 'givenName',
# 'last_name': 'sn',
# 'email': 'mail'
# }
# Only string fields can be mapped to attributes. Boolean fields can be
# defined by group membership:
# AUTH_LDAP_USER_FLAGS_BY_GROUP = {
# 'is_active': 'cn=active,ou=groups,dc=example,dc=com',
# 'is_staff': (
# LDAPGroupQuery('cn=staff,ou=groups,dc=example,dc=com')
# | LDAPGroupQuery('cn=admin,ou=groups,dc=example,dc=com')
# ),
# 'is_superuser': 'cn=superuser,ou=groups,dc=example,dc=com',
# }
# Simple group search
# AUTH_LDAP_GROUP_SEARCH = LDAPSearch(
# 'ou=groups,dc=example,dc=com', ldap.SCOPE_SUBTREE, '(objectClass=groupOfNames)'
# )
# AUTH_LDAP_GROUP_TYPE = GroupOfNamesType()
# Advanced group search
# AUTH_LDAP_GROUP_SEARCH = LDAPSearchUnion(
# LDAPSearch(
# 'ou=Domain Global,OU=Security,OU=Groups,OU=<OU>,dc=<top level DC>,dc=local',
# ldap.SCOPE_SUBTREE,
# '(&(objectClass=group)(groupType:1.2.840.113556.1.4.803:=2147483648))'
# ),
# LDAPSearch(
# 'ou=Domain Global,OU=Security,OU=Groups,OU=<OU>,dc=<top level DC>,dc=local',
# ldap.SCOPE_SUBTREE,
# '(&(objectClass=group)(groupType:1.2.840.113556.1.4.803:=2147483648))'
# ),
# )
# AUTH_LDAP_CACHE_GROUPS = True
# AUTH_LDAP_FIND_GROUP_PERMS = False
# AUTH_LDAP_GROUP_TYPE = NestedActiveDirectoryGroupType()
# AUTH_LDAP_MIRROR_GROUPS = True
# To minimize traffic to the LDAP server, LDAPBackend can make use of
# Djangos cache framework to keep a copy of a users LDAP group memberships.
# To enable this feature, set AUTH_LDAP_CACHE_TIMEOUT, which determines
# the timeout of cache entries in seconds.
# AUTH_LDAP_GROUP_CACHE_TIMEOUT = 3600
# Limiting Access
# The simplest use of groups is to limit the users who are allowed to log in.
# If AUTH_LDAP_REQUIRE_GROUP is set, then only users who are members of that
# group will successfully authenticate. AUTH_LDAP_DENY_GROUP is the reverse:
# if given, members of this group will be rejected.
# AUTH_LDAP_REQUIRE_GROUP = 'cn=enabled,ou=groups,dc=example,dc=com'
# AUTH_LDAP_DENY_GROUP = 'cn=disabled,ou=groups,dc=example,dc=com'
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:
kwargs = {'email': username}
else:
kwargs = {'username': username}
try:
user = get_user_model().objects.get(**kwargs)
if user.check_password(password):
return user
except get_user_model().DoesNotExist:
return None
def get_user(self, username):
try:
return get_user_model().objects.get(pk=username)
except get_user_model().DoesNotExist:
return None

View File

@@ -8,6 +8,8 @@ FROM debian:10.0-slim as BASE_IMAGE
LABEL maintainer="Roberto Rosario roberto.rosario@mayan-edms.com"
COPY config.env /config.env
ENV PYTHONUNBUFFERED=1 \
LC_ALL=C.UTF-8 \
PROJECT_INSTALL_DIR=/opt/mayan-edms
@@ -24,6 +26,8 @@ apt-get update \
&& apt-get install -y --no-install-recommends \
ca-certificates \
exiftool \
fonts-arphic-uming \
fonts-arphic-ukai \
ghostscript \
gpgv \
gnupg1 \
@@ -38,7 +42,7 @@ apt-get update \
sane-utils \
sudo \
supervisor \
tesseract-ocr \
tesseract-ocr tesseract-ocr-deu \
# Remove make and build dependencies
&& apt-get remove make libproxy-tools libreoffice-avmedia-backend-vlc libvlc-bin libvlc5 libvlccore9 adwaita-icon-theme gsettings-desktop-schemas libgstreamer-plugins-base1.0-0 -y \
&& apt-get autoremove -y --purge \
@@ -102,18 +106,22 @@ apt-get install -y --no-install-recommends \
&& chown -R mayan:mayan /src
USER mayan
RUN python3 -m venv "${PROJECT_INSTALL_DIR}" \
RUN set -a \
&& . /config.env \
&& set +a \
&& python3 -m venv "${PROJECT_INSTALL_DIR}" \
&& . "${PROJECT_INSTALL_DIR}/bin/activate" \
&& pip install --no-cache-dir \
librabbitmq==2.0.0 \
mysqlclient==1.4.2.post1 \
psycopg2==2.8.3 \
redis==3.2.1 \
flower==0.9.3 \
amqp==$PYTHON_AMQP_VERSION \
mysqlclient==$PYTHON_MYSQL_VERSION \
psycopg2==$PYTHON_PSYCOPG2_VERSION \
redis==$PYTHON_REDIS_VERSION \
flower==$PYTHON_FLOWER_VERSION \
# psutil is needed by ARM builds otherwise gevent and gunicorn fail to start
&& UNAME=`uname -m` && if [ "${UNAME#*arm}" != $UNAME ]; then \
pip install --no-cache-dir \
psutil==5.6.2 \
psutil==$PYTHON_PSUTIL_VERSION \
; fi \
# Install the Python packages needed to build Mayan EDMS
&& pip install --no-cache-dir -r /src/requirements/build.txt \

View File

@@ -1,40 +1,130 @@
#!make
include config.env
HOST_IP = `/sbin/ip route|awk '/docker0/ { print $$9 }'`
APT_PROXY ?= $(HOST_IP):3142
PIP_INDEX_URL ?= http://$(HOST_IP):3141/root/pypi/+simple/
PIP_TRUSTED_HOST ?= $(HOST_IP)
IMAGE_VERSION ?= `cat docker/rootfs/version`
CONSOLE_COLUMNS ?= `echo $$(tput cols)`
CONSOLE_LINES ?= `echo $$(tput lines)`
IMAGE_VERSION ?= `cat docker/rootfs/version`
PIP_INDEX_URL ?= http://$(HOST_IP):3141/root/pypi/+simple/
PIP_TRUSTED_HOST ?= $(HOST_IP)
docker-build: ## Build a new image locally.
docker build -t mayanedms/mayanedms:$(IMAGE_VERSION) -f docker/Dockerfile .
docker-build-with-proxy: ## Build a new image locally using an APT proxy as APT_PROXY.
docker-build-with-proxy: devpi-start
docker build -t mayanedms/mayanedms:$(IMAGE_VERSION) -f docker/Dockerfile --build-arg APT_PROXY=$(APT_PROXY) --build-arg PIP_INDEX_URL=$(PIP_INDEX_URL) --build-arg PIP_TRUSTED_HOST=$(PIP_TRUSTED_HOST) --build-arg HTTP_PROXY=$(HTTP_PROXY) --build-arg HTTPS_PROXY=$(HTTPS_PROXY) .
$(MAKE) devpi-stop
docker-shell: ## Launch a bash instance inside a running container. Pass the container name via DOCKER_CONTAINER.
docker exec -e TERM=$(TERM) -e "COLUMNS=$(CONSOLE_COLUMNS)" -e "LINES=$(CONSOLE_LINES)" -it $(DOCKER_CONTAINER) /bin/bash
docker-test-container: ## Build and run a test container.
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-runtest-container: ## Run a test container.
docker-runtest-container: docker-test-cleanup
docker run \
-d \
--name test-mayan-edms \
-p 80:8000 \
-v test-mayan_data:/var/lib/mayan \
mayanedms/mayanedms:$(IMAGE_VERSION)
docker-test-cleanup: ## Delete the test container and the test volume.
docker-runtest-cleanup: ## Delete the test container and the test volume.
@docker rm -f test-mayan-edms || true
@docker volume rm test-mayan_data || true
docker-test-all: ## Build and executed the test suite in a test container.
docker-test-all: docker-build-with-proxy
docker run --rm run-tests
docker-runtest-all: ## Executed the test suite in a test container.
docker run --rm mayanedms/mayanedms:$(IMAGE_VERSION) run_tests
docker-compose-build:
docker-compose -f docker/docker-compose.yml -p mayan-edms build
docker-compose-build-with-proxy:
docker-compose-build-with-proxy: devpi-start
docker-compose -f docker/docker-compose.yml -p mayan-edms build --build-arg APT_PROXY=$(APT_PROXY) --build-arg PIP_INDEX_URL=$(PIP_INDEX_URL) --build-arg PIP_TRUSTED_HOST=$(PIP_TRUSTED_HOST) --build-arg HTTP_PROXY=$(HTTP_PROXY) --build-arg HTTPS_PROXY=$(HTTPS_PROXY)
$(MAKE) devpi-stop
docker-compose-up:
docker-compose -f docker/docker-compose.yml -p mayan-edms up
docker-staging-network-create:
@docker network rm mayan-staging || true
docker network create mayan-staging
docker-staging-container-postgresql-start:
docker run \
-d \
--name mayan-staging-postgres \
--network=mayan-staging \
-e POSTGRES_USER=mayan \
-e POSTGRES_DB=mayan \
-e POSTGRES_PASSWORD=mayanuserpass \
-v mayan-staging-postgres:/var/lib/postgresql/data \
$(DOCKER_POSTGRES_IMAGE_VERSION)
docker-staging-container-redis-start:
docker run \
-d \
--name mayan-staging-redis \
--network=mayan-staging \
-v mayan-staging-redis:/data \
$(DOCKER_REDIS_IMAGE_VERSION) \
redis-server \
--databases \
"2" \
--maxmemory-policy \
allkeys-lru \
--save \
""
docker-staging-container-rabbitmq-start:
docker run \
-d \
--name mayan-staging-rabbitmq \
--network=mayan-staging \
-v mayan-staging-rabbitmq:/var/lib/rabbitmq \
$(DOCKER_RABBITMQ_IMAGE_VERSION) \
docker-staging-container-mayan-start:
sleep 5 && docker run \
-d \
--name mayan-staging-app \
--network=mayan-staging \
-p 80:8000 \
-e MAYAN_DATABASE_ENGINE=django.db.backends.postgresql \
-e MAYAN_DATABASE_HOST=mayan-staging-postgres \
-e MAYAN_DATABASE_NAME=mayan \
-e MAYAN_DATABASE_PASSWORD=mayanuserpass \
-e MAYAN_DATABASE_USER=mayan \
-e MAYAN_CELERY_BROKER_URL=$(MAYAN_CELERY_BROKER_URL) \
-e MAYAN_CELERY_RESULT_BACKEND="redis://mayan-staging-redis:6379/1" \
-v mayan-staging-app:/var/lib/mayan \
mayanedms/mayanedms:$(IMAGE_VERSION)
docker-staging-start-with-rabbitmq: MAYAN_CELERY_BROKER_URL="amqp://guest:guest@mayan-staging-rabbitmq:5672/"
docker-staging-start-with-rabbitmq: docker-staging-start
docker-staging-start-with-redis: MAYAN_CELERY_BROKER_URL="redis://mayan-staging-redis:6379/0"
docker-staging-start-with-redis: docker-staging-start
docker-staging-start: docker-staging-cleanup docker-staging-network-create docker-staging-container-postgresql-start docker-staging-container-rabbitmq-start docker-staging-container-redis-start docker-staging-container-mayan-start
docker logs -f mayan-staging-app
docker-staging-cleanup: ## Delete the test container and the test volume.
@docker rm -f mayan-staging-app || true
@docker rm -f mayan-staging-redis || true
@docker rm -f mayan-staging-rabbitmq || true
@docker rm -f mayan-staging-postgres || true
@docker volume rm mayan-staging-app || true
@docker volume rm mayan-staging-postgres || true
@docker volume rm mayan-staging-rabbitmq || true
@docker volume rm mayan-staging-redis || true
@docker network rm mayan-staging || true
devpi-init:
devpi-server --init || true
devpi-start: devpi-init
devpi-server --start --host=0.0.0.0 || true
devpi-stop:
devpi-server --stop || true

View File

@@ -18,10 +18,10 @@ services:
# Enable to use RabbitMQ
# MAYAN_CELERY_BROKER_URL: amqp://mayan:mayanrabbitpass@broker:5672/mayan
# Disable Redis Broker to use RabbitMQ as Broker
MAYAN_CELERY_BROKER_URL: redis://redis:6379/1
MAYAN_CELERY_RESULT_BACKEND: redis://redis:6379/0
MAYAN_CELERY_BROKER_URL: redis://redis:6379/0
MAYAN_CELERY_RESULT_BACKEND: redis://redis:6379/1
MAYAN_DATABASES: "{'default':{'ENGINE':'django.db.backends.postgresql','NAME':'mayan','PASSWORD':'mayandbpass','USER':'mayan','HOST':'postgresql'}}"
image: mayanedms/mayanedms:3.2.6
image: mayanedms/mayanedms:3.3
networks:
- mayan-bridge
ports:
@@ -35,7 +35,7 @@ services:
POSTGRES_DB: mayan
POSTGRES_PASSWORD: mayandbpass
POSTGRES_USER: mayan
image: postgres:9.6
image: postgres:9.6-alpine
networks:
- mayan-bridge
restart: unless-stopped
@@ -51,7 +51,7 @@ services:
- allkeys-lru
- --save
- ""
image: redis:5.0
image: redis:5.0-alpine
networks:
- mayan-bridge
restart: unless-stopped
@@ -69,7 +69,7 @@ services:
# # - rabbitmq
# environment:
# <<: *mayan_env
# image: mayanedms/mayanedms:3.2.6
# image: mayanedms/mayanedms:3.3
# networks:
# - mayan-bridge
# ports:
@@ -90,7 +90,7 @@ services:
# volumes:
# - /docker-volumes/mayan-edms/rabbitmq:/var/lib/rabbitmq
# Enable to run stand alone workers
# Enable to run standalone workers
# worker_fast:
# command:
# - run_worker
@@ -102,14 +102,14 @@ services:
# # - rabbitmq
# environment:
# <<: *mayan_env
# image: mayanedms/mayanedms:3.2.6
# image: mayanedms/mayanedms:3.3
# networks:
# - mayan-bridge
# restart: unless-stopped
# volumes:
# - /docker-volumes/mayan-edms/media:/var/lib/mayan
# Enable to run stand frontend gunicorn
# Enable to run frontend gunicorn
# frontend:
# command:
# - run_frontend
@@ -120,7 +120,7 @@ services:
# # - rabbitmq
# environment:
# <<: *mayan_env
# image: mayanedms/mayanedms:3.2.6
# image: mayanedms/mayanedms:3.3
# networks:
# - mayan-bridge
# ports:

View File

@@ -30,7 +30,7 @@ export MAYAN_STATIC_ROOT=${MAYAN_INSTALL_DIR}/static
MAYAN_WORKER_FAST_CONCURRENCY=${MAYAN_WORKER_FAST_CONCURRENCY:-0}
MAYAN_WORKER_MEDIUM_CONCURRENCY=${MAYAN_WORKER_MEDIUM_CONCURRENCY:-0}
MAYAN_WORKER_SLOW_CONCURRENCY=${MAYAN_WORKER_SLOW_CONCURRENCY:-0}
MAYAN_WORKER_SLOW_CONCURRENCY=${MAYAN_WORKER_SLOW_CONCURRENCY:-1}
update_uid_gid() {
echo "mayan: update_uid_gid()"
@@ -39,7 +39,7 @@ update_uid_gid() {
if [ ${MAYAN_USER_UID} -ne ${DEFAULT_USER_UID} ] || [ ${MAYAN_USER_GID} -ne ${DEFAULT_USER_GID} ]; then
echo "mayan: Updating file ownership. This might take a while if there are many documents."
chown mayan:mayan ${MAYAN_INSTALL_DIR} ${MAYAN_STATIC_ROOT} ${MAYAN_MEDIA_ROOT}
chown -R mayan:mayan ${MAYAN_INSTALL_DIR} ${MAYAN_STATIC_ROOT} ${MAYAN_MEDIA_ROOT}
fi
}
@@ -145,13 +145,17 @@ run_celery)
run_celery.sh "${@:2}"
;;
run_command)
su mayan -c "${MAYAN_BIN} ${@:2}"
;;
run_frontend)
run_frontend.sh
;;
run_tests)
make_ready
run_tests.sh
run_tests.sh "${@:2}"
;;
run_worker)

View File

@@ -1,10 +1,11 @@
#!/bin/sh
#!/bin/bash
export DEBIAN_FRONTEND=noninteractive
TEST_ARGUMENT=${@:-"--mayan-apps"}
apt-get update
apt-get install -y --no-install-recommends gcc python-dev tesseract-ocr-deu
apt-get install -y --no-install-recommends gcc python3-dev tesseract-ocr-deu
su mayan -c "$MAYAN_PIP_BIN install -r ${MAYAN_INSTALL_DIR}/testing-base.txt"
su mayan -c "${MAYAN_PIP_BIN} install -r ${MAYAN_INSTALL_DIR}/testing-base.txt"
su mayan -c "$MAYAN_BIN test --mayan-apps --settings=mayan.settings.testing"
su mayan -c "${MAYAN_BIN} test ${TEST_ARGUMENT} --settings=mayan.settings.testing"

View File

@@ -1,8 +1,12 @@
#!/bin/bash
QUEUE_LIST=`MAYAN_WORKER_NAME=$1 su mayan -c "${MAYAN_PYTHON_BIN_DIR}mayan-edms.py platformtemplate worker_queues"`
export MAYAN_WORKER_NAME=${MAYAN_WORKER_NAME:-$1}
QUEUE_LIST_DEFAULT=`su mayan -c "${MAYAN_PYTHON_BIN_DIR}mayan-edms.py platformtemplate worker_queues"`
MAYAN_QUEUE_LIST=${MAYAN_QUEUE_LIST:-${QUEUE_LIST_DEFAULT}}
# Use -A and not --app. Both are the same but behave differently
# -A can be located before the command while --app cannot.
# Pass ${@:2} to allow overriding the defaults arguments
su mayan -c "${MAYAN_PYTHON_BIN_DIR}celery -A mayan worker -Ofair -l ERROR -Q $QUEUE_LIST ${@:2}"
su mayan -c "${MAYAN_PYTHON_BIN_DIR}celery -A mayan worker -Ofair -l ERROR -Q ${MAYAN_QUEUE_LIST} ${@:2}"

View File

@@ -1 +1 @@
3.2.7
3.3.6

View File

@@ -1,229 +0,0 @@
"""
Sphinx plugins for Django documentation.
"""
import os
import re
from docutils import nodes, transforms
try:
import json
except ImportError:
try:
import simplejson as json
except ImportError:
try:
from django.utils import simplejson as json
except ImportError:
json = None
from sphinx import addnodes, roles, __version__ as sphinx_ver
from sphinx.builders.html import StandaloneHTMLBuilder
from sphinx.writers.html import SmartyPantsHTMLTranslator
from sphinx.util.console import bold
from sphinx.util.compat import Directive
# RE for option descriptions without a '--' prefix
simple_option_desc_re = re.compile(
r'([-_a-zA-Z0-9]+)(\s*.*?)(?=,\s+(?:/|-|--)|$)')
def setup(app):
app.add_crossref_type(
directivename = "setting",
rolename = "setting",
indextemplate = "pair: %s; setting",
)
app.add_crossref_type(
directivename = "templatetag",
rolename = "ttag",
indextemplate = "pair: %s; template tag"
)
app.add_crossref_type(
directivename = "templatefilter",
rolename = "tfilter",
indextemplate = "pair: %s; template filter"
)
app.add_crossref_type(
directivename = "fieldlookup",
rolename = "lookup",
indextemplate = "pair: %s; field lookup type",
)
app.add_description_unit(
directivename = "django-admin",
rolename = "djadmin",
indextemplate = "pair: %s; django-admin command",
parse_node = parse_django_admin_node,
)
app.add_description_unit(
directivename = "django-admin-option",
rolename = "djadminopt",
indextemplate = "pair: %s; django-admin command-line option",
parse_node = parse_django_adminopt_node,
)
app.add_config_value('django_next_version', '0.0', True)
app.add_directive('versionadded', VersionDirective)
app.add_directive('versionchanged', VersionDirective)
app.add_builder(DjangoStandaloneHTMLBuilder)
class VersionDirective(Directive):
has_content = True
required_arguments = 1
optional_arguments = 1
final_argument_whitespace = True
option_spec = {}
def run(self):
env = self.state.document.settings.env
arg0 = self.arguments[0]
is_nextversion = env.config.django_next_version == arg0
ret = []
node = addnodes.versionmodified()
ret.append(node)
if not is_nextversion:
if len(self.arguments) == 1:
linktext = 'Please see the release notes </releases/%s>' % (arg0)
xrefs = roles.XRefRole()('doc', linktext, linktext, self.lineno, self.state)
node.extend(xrefs[0])
node['version'] = arg0
else:
node['version'] = "Development version"
node['type'] = self.name
if len(self.arguments) == 2:
inodes, messages = self.state.inline_text(self.arguments[1], self.lineno+1)
node.extend(inodes)
if self.content:
self.state.nested_parse(self.content, self.content_offset, node)
ret = ret + messages
env.note_versionchange(node['type'], node['version'], node, self.lineno)
return ret
class DjangoHTMLTranslator(SmartyPantsHTMLTranslator):
"""
Django-specific reST to HTML tweaks.
"""
# Don't use border=1, which docutils does by default.
def visit_table(self, node):
self._table_row_index = 0 # Needed by Sphinx
self.body.append(self.starttag(node, 'table', CLASS='docutils'))
# <big>? Really?
def visit_desc_parameterlist(self, node):
self.body.append('(')
self.first_param = 1
self.param_separator = node.child_text_separator
def depart_desc_parameterlist(self, node):
self.body.append(')')
if sphinx_ver < '1.0.8':
#
# Don't apply smartypants to literal blocks
#
def visit_literal_block(self, node):
self.no_smarty += 1
SmartyPantsHTMLTranslator.visit_literal_block(self, node)
def depart_literal_block(self, node):
SmartyPantsHTMLTranslator.depart_literal_block(self, node)
self.no_smarty -= 1
#
# Turn the "new in version" stuff (versionadded/versionchanged) into a
# better callout -- the Sphinx default is just a little span,
# which is a bit less obvious that I'd like.
#
# FIXME: these messages are all hardcoded in English. We need to change
# that to accomodate other language docs, but I can't work out how to make
# that work.
#
version_text = {
'deprecated': 'Deprecated in Django %s',
'versionchanged': 'Changed in Django %s',
'versionadded': 'New in Django %s',
}
def visit_versionmodified(self, node):
self.body.append(
self.starttag(node, 'div', CLASS=node['type'])
)
title = "%s%s" % (
self.version_text[node['type']] % node['version'],
len(node) and ":" or "."
)
self.body.append('<span class="title">%s</span> ' % title)
def depart_versionmodified(self, node):
self.body.append("</div>\n")
# Give each section a unique ID -- nice for custom CSS hooks
def visit_section(self, node):
old_ids = node.get('ids', [])
node['ids'] = ['s-' + i for i in old_ids]
node['ids'].extend(old_ids)
SmartyPantsHTMLTranslator.visit_section(self, node)
node['ids'] = old_ids
def parse_django_admin_node(env, sig, signode):
command = sig.split(' ')[0]
env._django_curr_admin_command = command
title = "django-admin.py %s" % sig
signode += addnodes.desc_name(title, title)
return sig
def parse_django_adminopt_node(env, sig, signode):
"""A copy of sphinx.directives.CmdoptionDesc.parse_signature()"""
from sphinx.domains.std import option_desc_re
count = 0
firstname = ''
for m in option_desc_re.finditer(sig):
optname, args = m.groups()
if count:
signode += addnodes.desc_addname(', ', ', ')
signode += addnodes.desc_name(optname, optname)
signode += addnodes.desc_addname(args, args)
if not count:
firstname = optname
count += 1
if not count:
for m in simple_option_desc_re.finditer(sig):
optname, args = m.groups()
if count:
signode += addnodes.desc_addname(', ', ', ')
signode += addnodes.desc_name(optname, optname)
signode += addnodes.desc_addname(args, args)
if not count:
firstname = optname
count += 1
if not firstname:
raise ValueError
return firstname
class DjangoStandaloneHTMLBuilder(StandaloneHTMLBuilder):
"""
Subclass to add some extra things we need.
"""
name = 'djangohtml'
def finish(self):
super(DjangoStandaloneHTMLBuilder, self).finish()
if json is None:
self.warn("cannot create templatebuiltins.js due to missing simplejson dependency")
return
self.info(bold("writing templatebuiltins.js..."))
xrefs = self.env.domaindata["std"]["objects"]
templatebuiltins = {
"ttags": [n for ((t, n), (l, a)) in xrefs.items()
if t == "templatetag" and l == "ref/templates/builtins"],
"tfilters": [n for ((t, n), (l, a)) in xrefs.items()
if t == "templatefilter" and l == "ref/templates/builtins"],
}
outfilename = os.path.join(self.outdir, "templatebuiltins.js")
f = open(outfilename, 'wb')
f.write('var django_template_builtins = ')
json.dump(templatebuiltins, f)
f.write(';\n')
f.close();

BIN
docs/_static/book_cover.jpg vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 73 KiB

View File

@@ -3,3 +3,15 @@
background: #2c3e50;
padding: 3px;
}
.document a.internal {
text-decoration: none;
border-bottom: 1px dotted #707070;
}
.document a.internal:visited {
color: #2980B9;
text-decoration: none;
border-bottom: 1px dotted #707070;
}

View File

@@ -1,16 +0,0 @@
<h3>Support</h3>
<p>
<a href='http://www.mayan-edms.com/providers/'>Consulting and support plans are available, click here</a>.
</p>
<hr />
<p>
Or consider supporting Mayan EDMS by contributing to its development. (US tax payers, please note this contribution is not tax deductible).
</p>
<form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top">
<input type="hidden" name="cmd" value="_s-xclick">
<input type="hidden" name="hosted_button_id" value="3PXN336XFXQNN">
<input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
<img alt="" border="0" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1" style="display: none !important;">
</form>
<hr />

41
docs/_templates/message_area.html vendored Normal file
View File

@@ -0,0 +1,41 @@
<style>
.wy-body-for-nav #message-area {
color: #b3b3b3;
margin: 1em 2em 1em 1em;
}
#message-area {
border: 1px dotted #2980B9;
padding: .5em;
margin: 1em 0;
text-align: center;
}
</style>
<div id="message-area">
<h3>Get the book!</h3>
<a href="https://www.mayan-edms.com/book/">
<img src="{{ pathto('_static/book_cover.jpg', 1) }}" />
</a>
<hr />
<p>
On-site consulting and support plans are available, <a href='https://www.mayan-edms.com/support/'>click here</a>.
</p>
<hr />
<p>
Or consider donating to support the continued development of the project.
</p>
<form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top">
<input type="hidden" name="cmd" value="_s-xclick">
<input type="hidden" name="hosted_button_id" value="3PXN336XFXQNN">
<input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
<img alt="" border="0" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1" style="display: none !important;">
</form>
</div>

8
docs/callbacks.py Normal file
View File

@@ -0,0 +1,8 @@
from __future__ import unicode_literals
def get_source_read_callback(substitutions):
def global_substitution_function(app, docname, source):
for old, new in substitutions:
source[0] = source[0].replace(old, new)
return global_substitution_function

View File

@@ -1,6 +1,6 @@
********************
====================
Access control lists
********************
====================
Besides the permissions system explained in :doc:`../chapters/permissions`,
Mayan EDMS provides per object permission granting. This feature is used to

View File

@@ -1,159 +0,0 @@
************
App creation
************
Mayan EDMS apps are essentially Django app with some extra code to register
navigation, permissions and other relationships.
App modules
===========
- __init__.py
Should be empty if possible. No initialization code should be here, use the
ready() method of the MayanAppConfig class in the apps.py module.
- admin.py
Standard Django app module to define how models are to be presented in the
admin interface.
- api_views.py
REST API views go here. Mayan EDMS uses Django REST Framework API view
classes.
- apps.py
Contains the MayanAppConfig subclass as required by Django 1.7 and up. This
is a place to define the app name and translatable verbose name as well as
code to be execute when the modules of the app are ready.
- classes.py
Hold python classes to be used internally or externally. Any class defined by
the app that is not a model.
- events.py
Define event class instances that are later committed to a log by custom
code.
- exceptions.py
Custom exceptions defined by the app.
- fields.py
Place any custom form field classed you define here.
- forms.py
Standard Django app module that hold custom form classes.
- handlers.py
Contains the signal handlers, functions that will process a given signal
emitted from this or other apps. Connect the handler functions to the
corresponding signal in the ready() method of the MayanAppConfig subclass in
apps.py
- html_widgets.py
Classes to render an HTML widget. HTML widget are not the same as Django's
native form widgets. Form widgets only work as part of a form field.
HTML widgets are for use outside of forms, such as in a table cell.
- licenses.py
This module outlines the license text of the third party content used in
the app. It could be other Python libraries, JavaScript libraries, etc.
- links.py
Defines the links to be used by the app. Import only from the navigation app
and the local permissions.py file.
- literals.py
Stores magic numbers, module choices (if static), settings defaults, and
constants. Should contain all capital case variables. Must not import from
any other module.
- managers.py
Standard Django app module that hold custom model managers. These act as
model class method to performs actions in a series of model instances or
utilitarian actions on external models instances.
- models.py
Standard Django app module that defines ORM persistent data schema.
- permissions.py
Defines the permissions to be used to validate user access by links and views.
Imports only from the permissions app. Link or view conditions such as
testing for is_staff or is_super_user flag are defined in this same module.
- runtime.py
Use this module when you need the same instance of a class for the entire app.
This module acts as a shared memory space for the other modules of the app or
other apps.
- search.py
Search model definitions. Define which field of the app's models are
searchable.
- serializers.py
Hold Django REST Framework serializers used by the api_views.py module.
- settings.py
Define the configuration settings instances that the app will use.
- signals.py
Any custom defined signal goes here.
- statistics.py
Provides functions that will compute any sort of statistical information on
the apps data.
- tasks.py
Code to be execute in the background or as an out-of-process action.
- tests/ directory
Hold test modules. There should be one test_*.py module for each aspect being
tested, examples: test_api.py, test_views.py, test_parsers.py, test_permissions.py
Any shared constant data used by the tests should be added to tests/literals.py
- utils.py
Holds utilitarian code that doesn't fit on any other app module or that is
used by several modules in the app. Anything used internally by the app that
is not a class or a literal (should be as little as possible)
- widgets.py
Custom form widgets go here. This should be the only place with presentation
directives in the app (aside the templates).
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
These views handle aspects relating to view permissions, object permissions,
post action redirection and template context generation.

View File

@@ -1,70 +0,0 @@
*******
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.6
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``

18
docs/chapters/backups.txt Normal file
View File

@@ -0,0 +1,18 @@
=======
Backups
=======
To backup your install of Mayan EDMS just copy the ``media`` folder and
the database content.
If you are using the default storage backend, the ``media`` should be located
at |MAYAN_MEDIA_ROOT|::
sudo tar -zcvf backup.tar.gz |MAYAN_MEDIA_ROOT|
To dump the content of your database manager refer to the documentation chapter
regarding database data "dumping".
- PostgreSQL: https://www.postgresql.org/docs/current/backup-dump.html
- MySQL: https://dev.mysql.com/doc/refman/5.7/en/mysqldump.html

View File

@@ -1,13 +1,11 @@
========
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.
contain documents as well as other sub level cabinets.
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

@@ -1,103 +0,0 @@
*******************
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 --no-use-pep517 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=0,
<...>

View File

@@ -1,253 +0,0 @@
******************
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.
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.
Compilers and development libraries will be installed to compile runtime
libraries. LibreOffice and Poppler utils will also be installed as they are
used to convert document files. Supervisor (https://supervisord.org/), a
Process Control System, will be used to monitor and keep all Mayan processes
running.
Basic deployment
================
This setup uses less memory and CPU resources at the expense of some speed.
For another setup that offers more performance and scalability refer to the
`Advanced deployment`_ below.
1. Install binary dependencies:
-------------------------------
If using a Debian_ or Ubuntu_ based Linux distribution, get the executable
requirements using::
sudo apt-get install 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
.. note::
Platforms with the ARM CPU might also need additional requirements.
::
sudo apt-get install libffi-dev libssl-dev -y
2. Create the user account for the installation:
------------------------------------------------
This will create an unprivileged user account that is also unable to login.
::
sudo adduser mayan --disabled-password --disabled-login --no-create-home --gecos ""
3. Create the parent directory where the project will be deployed:
------------------------------------------------------------------
``/opt/`` is a good choice as it is meant is for "software and add-on packages
that are not part of the default installation". (https://www.tldp.org/LDP/Linux-Filesystem-Hierarchy/html/opt.html)
::
sudo mkdir /opt
4. Create the Python virtual environment:
-----------------------------------------
This will keep all the Python packages installed here isolated from the rest
of the Python packages in the system.
::
sudo virtualenv /opt/mayan-edms
5. Make the mayan user the owner of the installation directory:
---------------------------------------------------------------
::
sudo chown mayan:mayan /opt/mayan-edms -R
6. Install Mayan EDMS from PyPI:
--------------------------------
::
sudo -u mayan /opt/mayan-edms/bin/pip install --no-cache-dir --no-use-pep517 mayan-edms
7. Install the Python client for PostgreSQL and Redis:
------------------------------------------------------
::
sudo -u mayan /opt/mayan-edms/bin/pip install --no-cache-dir --no-use-pep517 psycopg2==2.7.3.2 redis==2.10.6
.. note::
Platforms with the ARM CPU might also need additional requirements.
::
sudo -u mayan /opt/mayan-edms/bin/pip install --no-cache-dir --no-use-pep517 psutil==5.6.2
8. Create the database for the installation:
--------------------------------------------
::
sudo -u postgres psql -c "CREATE USER mayan WITH password 'mayanuserpass';"
sudo -u postgres createdb -O mayan mayan
9. Initialize the project:
--------------------------
This step will create all the database structures, download static media files
like JavaScript libraries and HTML frameworks, and create and initial admin
account with a random password.
.. note::
For simplicity, the ``MAYAN_MEDIA_ROOT`` folder is set to be a subfolder
of the installation. If you want to keep your files separated from
the installation files, change the value of the ``MAYAN_MEDIA_ROOT``
variable in this and all subsequent steps. Be sure to first create the
folder and give ownership of it to the ``mayan`` user with the ``chown``
command.
.. warning::
If this step is interrupted, even if it is later resumed, will
cause the automatic admin user to no be created in some cases. Make sure all
environment variable and values are correct. If this happens, refer to the
troubleshooting chapters: :ref:`troubleshooting-autoadmin-account` and
:ref:`troubleshooting-admin-password`.
::
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
10. Collect the static files:
-----------------------------
This step merges and compressed static media files so they can be served more
effectively.
::
sudo -u mayan MAYAN_MEDIA_ROOT=/opt/mayan-edms/media \
/opt/mayan-edms/bin/mayan-edms.py preparestatic --noinput
11. Create the supervisor file at ``/etc/supervisor/conf.d/mayan.conf``:
------------------------------------------------------------------------
::
sudo 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 platformtemplate supervisord > /etc/supervisor/conf.d/mayan.conf
12. Configure Redis:
--------------------
Configure Redis to discard data when it runs out of memory, not save its
database and only keep 1 database:
::
sudo echo "maxmemory-policy allkeys-lru" >> /etc/redis/redis.conf
sudo echo "save \"\"" >> /etc/redis/redis.conf
sudo echo "databases 1" >> /etc/redis/redis.conf
sudo systemctl restart redis
13. Enable and restart the services [1_]:
-----------------------------------------
::
sudo systemctl enable supervisor
sudo systemctl restart supervisor
14. Cleaning up:
----------------
The following operating system dependencies are only needed during
installation and can be removed.
::
sudo apt-get remove --purge libjpeg-dev libpq-dev libpng-dev libtiff-dev zlib1g-dev
.. _deployment_advanced:
Advanced deployment
===================
This variation uses RabbitMQ as the message broker. RabbitMQ consumes more
memory but scales to thousands of messages per second. RabbitMQ messages are also
persistent by default, this means that pending tasks are not lost in the case
of a restart or power failure. The Gunicorn workers are increased to 3.
1. Install RabbitMQ:
--------------------
If using a Debian_ or Ubuntu_ based Linux distribution, get the executable
requirements using::
sudo apt-get install rabbitmq-server -y
2. Install the Python client for RabbitMQ:
------------------------------------------
::
sudo -u mayan /opt/mayan-edms/bin/pip install --no-cache-dir --no-use-pep517 librabbitmq==2.0.0
3. Create the RabbitMQ user and vhost:
--------------------------------------
::
sudo rabbitmqctl add_user mayan mayanrabbitmqpassword
sudo rabbitmqctl add_vhost mayan
sudo rabbitmqctl set_permissions -p mayan mayan ".*" ".*" ".*"
4. Edit the supervisor file at ``/etc/supervisor/conf.d/mayan.conf``:
---------------------------------------------------------------------
Replace (paying attention to the comma at the end)::
MAYAN_CELERY_BROKER_URL="redis://127.0.0.1:6379/0",
with::
MAYAN_CELERY_BROKER_URL="amqp://mayan:mayanrabbitmqpassword@localhost:5672/mayan",
increase the number of Gunicorn workers to 3 in the line (``-w 2`` section)::
command = /opt/mayan-edms/bin/gunicorn -w 2 mayan.wsgi --max-requests 1000 --max-requests-jitter 50 --worker-class gevent --bind 0.0.0.0:8000 --timeout 120
remove the concurrency limit (or increase it) of the fast worker (remove ``--concurrency=1``).
5. Restart the services:
------------------------
::
sudo supervisorctl restart all
[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

273
docs/chapters/deploying.txt Normal file
View File

@@ -0,0 +1,273 @@
.. _deployment_basic:
=================
Direct deployment
=================
Mayan EDMS should be deployed like any other Django_ project and
preferably using virtualenv_. Below are some ways to deploy and use Mayan EDMS.
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.
Compilers and development libraries will be installed to compile runtime
libraries. LibreOffice and Poppler utils will also be installed as they are
used to convert document files. Supervisor (https://supervisord.org/), a
Process Control System, will be used to monitor and keep all Mayan processes
running.
Basic deployment
================
This setup uses less memory and CPU resources at the expense of some speed.
For another setup that offers more performance and scalability refer to the
`Advanced deployment`_ below.
#. Install binary dependencies:
If using a Debian_ or Ubuntu_ based Linux distribution, get the executable
requirements using:
.. code-block:: bash
sudo apt-get install exiftool g++ gcc ghostscript gnupg1 graphviz \
libfuse2 libjpeg-dev libmagic1 libpq-dev libpng-dev libreoffice \
libtiff-dev poppler-utils postgresql python3-dev python3-virtualenv
redis-server sane-utils supervisor tesseract-ocr zlib1g-dev -y
.. note::
Platforms with the ARM CPU might also need additional requirements:
.. code-block:: bash
sudo apt-get install libffi-dev libssl-dev -y
#. Create the user account for the installation:
This will create an unprivileged user account that is also unable to login:
.. code-block:: bash
sudo adduser mayan --disabled-password --disabled-login --gecos ""
#. Create the parent directory where the project will be deployed:
``/opt/`` is a good choice as it is meant is for "software and add-on packages
that are not part of the default installation". (https://www.tldp.org/LDP/Linux-Filesystem-Hierarchy/html/opt.html).
Create the ``/opt`` directory if it doesn't already exists:
.. code-block:: bash
sudo mkdir /opt
#. Create the Python virtual environment:
This will keep all the Python packages installed here isolated from the rest
of the Python packages in the system:
.. code-block:: bash
sudo virtualenv |MAYAN_INSTALLATION_DIRECTORY| -p /usr/bin/python3
#. Make the mayan user the owner of the installation directory:
.. code-block:: bash
sudo chown mayan:mayan |MAYAN_INSTALLATION_DIRECTORY| -R
#. Install Mayan EDMS from PyPI:
.. code-block:: bash
sudo -u mayan |MAYAN_PIP_BIN| install --no-use-pep517 mayan-edms
#. Install the Python client for PostgreSQL and Redis:
.. code-block:: bash
sudo -u mayan |MAYAN_PIP_BIN| install --no-use-pep517 psycopg2==|PYTHON_PSYCOPG2_VERSION| redis==|PYTHON_REDIS_VERSION|
.. note::
Platforms with the ARM CPU might also need additional requirements:
.. code-block:: bash
sudo -u mayan |MAYAN_PIP_BIN| install --no-use-pep517 psutil==|PYTHON_PSUTIL_VERSION|
#. Create the database for the installation:
.. code-block:: bash
sudo -u postgres psql -c "CREATE USER mayan WITH password 'mayanuserpass';"
sudo -u postgres createdb -O mayan mayan
#. Initialize the project:
This step will create all the database structures, download static media files
like JavaScript libraries and HTML frameworks, and create and initial admin
account with a random password.
.. note::
For simplicity, the ``MAYAN_MEDIA_ROOT`` folder is set to be a subfolder
of the installation. If you want to keep your files separated from
the installation files, change the value of the ``MAYAN_MEDIA_ROOT``
variable in this and all subsequent steps. Be sure to first create the
folder and give ownership of it to the ``mayan`` user with the ``chown``
command.
.. warning::
If this step is interrupted, even if it is later resumed, will
cause the automatic admin user to not be created in some cases. Make
sure all environment variables and values are correct. If this
happens, refer to the troubleshooting chapters:
:ref:`troubleshooting-autoadmin-account` and
:ref:`troubleshooting-admin-password`.
.. code-block:: bash
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=|MAYAN_MEDIA_ROOT| \
|MAYAN_BIN| initialsetup
#. Collect the static files:
This step merges and compressed static media files so they can be served more
effectively.
.. code-block:: bash
sudo -u mayan MAYAN_MEDIA_ROOT=|MAYAN_MEDIA_ROOT| \
|MAYAN_BIN| preparestatic --noinput
#. Create the supervisor file at ``|MAYAN_SUPERVISOR_CONF|``:
.. code-block:: bash
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=|MAYAN_MEDIA_ROOT| \
|MAYAN_BIN| platformtemplate supervisord | sudo sh -c "cat > |MAYAN_SUPERVISOR_CONF|"
#. Configure Redis:
Configure Redis to discard data when it runs out of memory, not save its
database and only keep 2 database:
.. code-block:: bash
sudo echo "maxmemory-policy allkeys-lru" >> /etc/redis/redis.conf
sudo echo "save \"\"" >> /etc/redis/redis.conf
sudo echo "databases 2" >> /etc/redis/redis.conf
sudo systemctl restart redis
#. Enable and restart the services [1_]:
.. code-block:: bash
sudo systemctl enable supervisor
sudo systemctl restart supervisor
#. Cleaning up:
The following operating system dependencies are only needed during
installation and can be removed.
.. code-block:: bash
sudo apt-get remove --purge libjpeg-dev libpq-dev libpng-dev libtiff-dev zlib1g-dev
.. _deployment_advanced:
Advanced deployment
===================
This variation uses RabbitMQ as the message broker. RabbitMQ consumes more
memory but scales to thousands of messages per second. RabbitMQ messages are also
persistent by default, this means that pending tasks are not lost in the case
of a restart or power failure. The Gunicorn workers are increased to 3.
#. Install RabbitMQ:
If using a Debian_ or Ubuntu_ based Linux distribution, get the executable
requirements using:
.. code-block:: bash
sudo apt-get install rabbitmq-server -y
#. Install the Python client for RabbitMQ:
.. code-block:: bash
sudo -u mayan |MAYAN_PIP_BIN| install --no-use-pep517 amqp==|PYTHON_AMQP_VERSION|
#. Create the RabbitMQ user and vhost:
.. code-block:: bash
sudo rabbitmqctl add_user mayan mayanrabbitmqpassword
sudo rabbitmqctl add_vhost mayan
sudo rabbitmqctl set_permissions -p mayan mayan ".*" ".*" ".*"
#. Edit the supervisor file at ``|MAYAN_SUPERVISOR_CONF|``:
Replace (paying attention to the comma at the end):
.. code-block:: ini
MAYAN_CELERY_BROKER_URL="redis://127.0.0.1:6379/0",
with:
.. code-block:: ini
MAYAN_CELERY_BROKER_URL="amqp://mayan:mayanrabbitmqpassword@localhost:5672/mayan",
increase the number of Gunicorn workers to 3 in the line (``-w 2`` section):
.. code-block:: ini
command = |MAYAN_GUNICORN_BIN| -w 2 mayan.wsgi --max-requests 1000 --max-requests-jitter 50 --worker-class gevent --bind 0.0.0.0:8000 --timeout 120
remove the concurrency limit (or increase it) of the fast worker (remove ``--concurrency=1``).
#. Restart the services:
.. code-block:: bash
sudo supervisorctl reread
sudo supervisorctl restart all
[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

View File

@@ -1,6 +1,6 @@
**************************************************
==================================================
Mayan EDMS Entity Contributor Assignment Agreement
**************************************************
==================================================
Thank you for your interest in contributing to Mayan EDMS ("We" or "Us").
@@ -14,6 +14,7 @@ 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
@@ -55,6 +56,7 @@ first Submit a Contribution to Us, whichever is earlier.
2. Grant of Rights
==================
2.1 Copyright Assignment
------------------------
@@ -101,6 +103,7 @@ 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
----------------
@@ -108,12 +111,14 @@ 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
-------------------------
@@ -159,6 +164,7 @@ OR OTHERWISE) UPON WHICH THE CLAIM IS BASED.
6. Miscellaneous
================
6.1 Jurisdiction
----------------
@@ -170,19 +176,25 @@ 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
@@ -190,8 +202,10 @@ 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.

View File

@@ -1,6 +1,6 @@
******************************************************
======================================================
Mayan EDMS Individual Contributor Assignment Agreement
******************************************************
======================================================
Thank you for your interest in contributing to Mayan EDMS ("We" or "Us").
@@ -11,6 +11,7 @@ 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
==============
@@ -43,9 +44,11 @@ or otherwise designated in writing by You as "Not a Contribution."
"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
------------------------
@@ -87,6 +90,7 @@ 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
@@ -156,6 +160,7 @@ OR OTHERWISE) UPON WHICH THE CLAIM IS BASED.
6. Miscellaneous
================
6.1 Jurisdiction
----------------
@@ -167,12 +172,14 @@ 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
-----------------
@@ -180,6 +187,7 @@ 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
--------------------------
@@ -190,6 +198,7 @@ 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
----------------

View File

@@ -0,0 +1,243 @@
==============
Code structure
==============
Follow PEP8
-----------
Whenever possible, but don't obsess over things like line length:
.. code-block:: bash
$ flake8 --ignore=E501,E128,E122 |less
To perform automatic PEP8 checks, install flake8's git hook using:
.. code-block:: bash
$ flake8 --install-hook git
Imports
-------
Import order should be:
- Standard Python modules
- Installed Python modules
- Core Django modules
- Installed Django modules
- Mayan EDMS modules
- Local imports
Example:
.. code-block:: bash
from __future__ import absolute_import
# Standard Python library
import base64
# 3rd party installed Python libraries
import requests
# Django core modules
from django.db.models import Q
from django.template.defaultfilters import slugify
from django.utils.translation import ugettext
from django.utils.translation import ugettext_lazy as _
# 3rd party installed Django libraries
from rest_framework import APIView
# Mayan apps
from metadata.classes import MetadataClass
# Local app imports (relative)
from .conf.settings import (
AVAILABLE_INDEXING_FUNCTIONS,
MAX_SUFFIX_COUNT, SLUGIFY_PATHS
)
from .exceptions import MaxSuffixCountReached
from .filesystem import (
fs_create_index_directory, fs_create_document_link,
fs_delete_document_link, fs_delete_index_directory,
assemble_suffixed_filename
)
from .models import Index, IndexInstanceNode, DocumentRenameCount
All local app module imports are in relative form. Local app module name is to
be referenced as little as possible, unless required by a specific feature,
trick, restriction (e.g., Runtime modification of the module's attributes).
Incorrect:
.. code-block:: bash
# documents app views.py model
from documents.models import Document
Correct:
.. code-block:: bash
# documents app views.py model
from .models import Document
Dependencies
------------
Mayan EDMS apps follow a hierarchical model of dependency. Apps import from
their parents or siblings, never from their children. Think plugins. A parent
app must never assume anything about a possible existing child app. The
documents app and the Document model are the basic entities; they must never
import anything else. The common and main apps are the base apps.
Variables
---------
Naming of variables should follow a Major to Minor convention, usually
including the purpose of the variable as the first piece of the name, using
underscores as spaces. camelCase is not used in Mayan EDMS.
Examples:
Links:
.. code-block:: bash
link_document_page_transformation_list = ...
link_document_page_transformation_create = ...
link_document_page_transformation_edit = ...
link_document_page_transformation_delete = ...
Constants:
.. code-block:: bash
PERMISSION_SMART_LINK_VIEW = ...
PERMISSION_SMART_LINK_CREATE = ...
PERMISSION_SMART_LINK_DELETE = ...
PERMISSION_SMART_LINK_EDIT = ...
Classes:
.. code-block:: bash
class Document(models.Model):
class DocumentPage(models.Model):
class DocumentPageTransformation(models.Model):
class DocumentType(models.Model):
class DocumentTypeFilename(models.Model):
Strings
-------
Quotation character used in Mayan EDMS for strings is the single quote.
Double quote is used for multiple line comments or HTML markup.
Migrations
----------
Migrations should do only one thing (example: either create a table, move data
to a new table or remove an old table) to aid retrying on failure.
General
-------
Code should appear in their modules in alphabetic order or in their order of
importance if it makes more sense for the specific application. This makes
visual scanning easier on modules with a large number of imports, views or
classes. Class methods that return a value should be pretended with a
``get_`` to differentiate from an objects properties. When a variable refers
to a file it should be named as follows:
- filename: The files name and extension only.
- filepath: The entire path to the file including the filename.
- path: A path to a directory.
Flash messages should end with a period as applicable for the language.
Only exception is when the tail of the message contains an exceptions message
as passed directly from the exception object.
Steps to deploy a development version
=====================================
.. code-block:: bash
$ git clone |SOURCE_CODE_GIT|
$ cd mayan-edms
$ git checkout <Corresponding branch>
$ virtualenv venv
$ source venv/bin/activate
$ pip install -r requirements.txt
$ ./manage.py initialsetup
$ ./manage.py preparestatic
$ ./manage.py runserver
Debugging
=========
Mayan EDMS makes extensive use of Django's new
:django-docs:`logging capabilities <topics/logging>`.
By default debug logging for all apps is turned on. If you wish to customize
how logging is managed turn off automatic logging by setting
`COMMON_AUTO_LOGGING` to ``False`` and add the following lines to your
``settings/local.py`` file::
LOGGING = {
'version': 1,
'disable_existing_loggers': True,
'formatters': {
'verbose': {
'format': '%(levelname)s %(asctime)s %(name)s %(process)d %(thread)d %(message)s'
},
'intermediate': {
'format': '%(name)s <%(process)d> [%(levelname)s] "%(funcName)s() %(message)s"'
},
'simple': {
'format': '%(levelname)s %(message)s'
},
},
'handlers': {
'console':{
'level':'DEBUG',
'class':'logging.StreamHandler',
'formatter': 'intermediate'
}
},
'loggers': {
'documents': {
'handlers':['console'],
'propagate': True,
'level':'DEBUG',
},
'common': {
'handlers':['console'],
'propagate': True,
'level':'DEBUG',
},
}
}
Likewise, to see the debug output of the ``tags`` app, just add the following inside the ``loggers`` block::
'tags': {
'handlers':['console'],
'propagate': True,
'level':'DEBUG',
},

View File

@@ -0,0 +1,18 @@
============
Contributing
============
Mayan EDMS is under active development, and contributions are welcome.
If you have a feature request, suggestion or bug report, please open a new
issue on the `GitLab issue tracker`_. To submit patches, please send a merge
request on GitLab_.
.. _GitLab: |SOURCE_CODE_REPOSITORY|
.. _`GitLab issue tracker`: |SOURCE_CODE_ISSUES|
Contributing changes
====================
Follow the latest contributing guidelines outlined here:
|SOURCE_CODE_REPOSITORY|blob/master/CONTRIBUTING.md

View File

@@ -0,0 +1,24 @@
=============
Documentation
=============
The documentation is written in `reStructured Text`_ format, processed with
Sphinx_, and resides in the ``docs`` directory. In order to build it, you will
first need to install the documentation editing dependencies with::
$ pip install -r requirements/documentation.txt
Then, to build an HTML version of the documentation, run the following command
from the **docs** directory::
$ make docs-serve
The generated documentation can be viewed by browsing to http://127.0.0.1:8000
or by browsing to the ``docs/_build/html`` directory.
You can also generate the documentation in formats other than HTML. Consult the
Sphinx_ documentation for more details.
.. _`reStructured Text`: http://docutils.sourceforge.net/rst.html
.. _Sphinx: http://sphinx.pocoo.org

View File

@@ -0,0 +1,29 @@
==============
For developers
==============
- :doc:`philosophies`
- :doc:`code_structure`
- :doc:`documentation`
- :doc:`source_control`
- :doc:`contributing`
- :doc:`releases`
- :doc:`translations`
- :doc:`../../mercs/index`
- :doc:`caa_entity`
- :doc:`caa_individual`
.. toctree::
:hidden:
philosophies
code_structure
documentation
source_control
contributing
releases
translations
../../mercs/index
caa_entity
caa_individual

View File

@@ -0,0 +1,29 @@
====================
Project philosophies
====================
How to think about Mayan EDMS when doing changes or adding new features;
why things are the way they are in Mayan EDMS:
- Functionality must be as market/sector independent as possible, code for the
95% of use cases.
- Each user must be able to configure and customize it to their needs after
install.
- Abstract as much as possible, each app must be an expert in just one thing,
for other things they should use the API/classes/functions of other apps.
- Assume as little as possible about anything outside the project
(hardware, OS, storage).
- Provide Python based abstraction so that a default install runs with a single
step.
- No hard dependencies on binaries unless there is no other choice.
- Provide “drivers” or switchable backends to allow users to fine tune the
installation.
- Call to binaries only when there is no other choice or the Python choices are
not viable/mature/efficient.
- Each app is as independent and self contained as possible. Exceptions, the
basic requirements: navigation, permissions, common, main.
- If an app is meant to be used by more than one other app, it should be as
generic as possible in regard to the project and another app will bridge the functionality.
- Example: since indexing (document_indexing) only applies to documents, the
app is specialized and depends on the documents app.

View File

@@ -0,0 +1,173 @@
===================
Installable package
===================
Source file package
-------------------
This is the sequence of step used to produce an installable package:
1. Generate the packaged version (will produce dist/mayan-edms-x.y.z.tar.gz)::
$ make sdist
2. Do a test install::
$ cd /tmp
$ virtualenv venv
$ source venv/bin/activate
$ pip install <path of the Git repository>/dist/mayan-edms-x.y.z.tar.gz
$ mayan-edms.py initialsetup
$ mayan-edms.py preparestatic
$ mayan-edms.py runserver
Wheel package
-------------
1. Install the development requirements::
$ pip install -r requirements/development.txt
2. Create wheel package using the makefile::
$ make wheel
3. Do a test install::
$ cd /tmp
$ virtualenv venv
$ source venv/bin/activate
$ pip install <path of the Git repository>/dist/mayan_edms-x.y.z-py2-none-any.whl
$ mayan-edms.py initialsetup
$ mayan-edms.py preparestatic
$ mayan-edms.py runserver
Version numbering
=================
Mayan EDMS uses the Semantic Versioning (http://semver.org/) method to choose
version numbers along with Python's PEP-0440 (https://www.python.org/dev/peps/pep-0440/)
to format them.
X.YaN # Alpha release
X.YbN # Beta release
X.YrcN # Release Candidate
X.Y # Final release
Release checklist
=================
#. Check for missing migrations::
make check-missing-migrations
#. Synchronize translations::
make translations-pull
#. Compile translations::
make translations-compile
#. Update changelog.
#. Write release notes.
#. Scan the code with flake8 for simple style warnings.
#. Check README.rst format with::
python setup.py check -r -s
or with::
make check-readme
#. Bump version in ``mayan/__init__.py`` and ``docker/rootfs/version``::
make increase-version PART=<major, minor or micro>
#. Update requirements version in ``setup.py`` using:
::
make generate-setup
#. Commit as version bump.
#. Build source package and test:
::
make test-sdist-via-docker-ubuntu
#. Build wheel package and test:
::
make test-wheel-via-docker-ubuntu
#. Tag version:
::
git tag -a vX.Y.Z -m "Version X.Y.Z"
#. Generate set ``setup.py`` again to update the build number::
make generate-setup
#. Commit the new ``setup.py`` file.
#. Release the version using one of the two following methods: GitLab CI or
manual
Release using GitLab CI using the makefile
------------------------------------------
#. Use of the GitLab makefile targets: ``gitlab-release-all``,
``gitlab-release-docker``, ``gitlab-release-documentation``,
``gitlab-release-python``.
Release using GitLab CI manually
--------------------------------
#. Push the current brach:
::
git push
#. Push the new tags:
::
git push --tags
#. Delete the corresponding ``releases/`` branch:
::
git push origin :releases/<branch>
#. Push the current branch to the corresponding origin ``releases/`` branch:
::
git push origin <local branch>:releases/<branch>
Manual release
--------------
#. Build and upload a test release:
::
make release-test-via-docker-ubuntu
#. Build and upload a final release:
::
make release-via-docker-ubuntu
Other steps
-----------
#. Update the contrib/scripts/install/docker.sh values
#. Upload contrib/scripts/install/docker.sh to https://get.mayan-edms.com

View File

@@ -0,0 +1,99 @@
==============
Source Control
==============
Mayan EDMS source is controlled with Git_.
The project is publicly accessible, hosted and can be cloned from **GitLab** using::
$ git clone |SOURCE_CODE_GIT|
Git branch structure
--------------------
Mayan EDMS follows a simplified model layout based on Vincent Driessen's
`Successful Git Branching Model`_ blog post.
``/versions/micro``
Working branch for the next bugfix release. Micro increment (third digit).
Only bug fixes, minor features, back-ported urgent features. This
branch is stable and safe for production.
``/versions/minor``
Working branch for the next minor release (second digit). New features,
occasional breakage. Not for production but should run in test
environment most of the time. This is the branch you will want to
try out if you want to check out new features.
``/versions/major``
Working branch for the next major release (first digit). New features,
incompatible changes to the user facing interfaces. Broken most of the
time, not for production and should only be cloned by developers
with experience with Mayan's development.
``master``
Current production release (|version|). Points to the latest version of
the latest series. Production quality code.
``features/``
Working branches for unfinished and unmerged feature. Likely unstable,
don't use in production. Once the feature is complete, it is merged
into one of the versions branches and deleted.
Special branches:
``releases/all``
Pushing code to this branch will trigger the build and release
a new Docker image, Documentation and Python package.
``releases/docker``
Pushing code to this branch will trigger the build and release
of a new Docker image to Docker Hub.
``releases/documentation``
Pushing code to this branch will trigger the build and release
of new documentation.
``releases/python``
Pushing code to this branch will trigger the build and release
of a new Python package to PyPI.
``nightly``
Pushing code to this branch will trigger the build and release
of a new Docker image based on development code to the GitLab image
repository only. The image will not be published to Docker Hub.
Each release is tagged separately using annotated Git tags.
When submitting patches, please place your code in its own ``feature/`` branch
prior to opening a Merge Request on |SOURCE_CODE_ISSUES|.
.. _Git: http://git-scm.org
.. _`Successful Git Branching Model`: http://nvie.com/posts/a-successful-git-branching-model/
Commit messages
---------------
#. Use English as the language for the commit messages.
#. Provide a subject line composed of a tag and a short explanation::
Indexing: Add document base property reindex
#. Keep the subject line to 50 or less characters.
#. Capitalize the subject line.
#. Don't end the subject line with a period, leave like a phrase in English.
#. Use active voice in the. Say what the commit will do when applied not what
you did::
Add new properties to the model.
Vs.
::
Added new properties to the model.
#. Limit the body of the commit to 72 characters.
#. When a commit fixes or improves an issue add the issue number in the commit
message. Either in the subject or in the body.
#. Sign commit messages.
#. Use explicit language even for minor commits. Don't do::
Fix typo
Use::
Document: Fix typo in label description

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

@@ -1,362 +0,0 @@
============
Docker image
============
How to use this image
=====================
.. _docker_install:
Start a Mayan EDMS Docker image
-------------------------------
With Docker properly installed, proceed to download the Mayan EDMS image using
the command::
docker pull mayanedms/mayanedms:<version>
Instead of a specific version tag you may use then generic ``:latest`` tag
to the get latest version available automatically. If you use the ``:latest``
tag here, remember to do so in the next steps also.::
docker pull mayanedms/mayanedms:latest
Then download version 9.6 of the Docker PostgreSQL image::
docker pull postgres:9.6
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.6
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::
docker run -d \
--name mayan-edms \
--restart=always \
-p 80:8000 \
-e MAYAN_DATABASES="{'default':{'ENGINE':'django.db.backends.postgresql','NAME':'mayan','PASSWORD':'mayanuserpass','USER':'mayan','HOST':'172.17.0.1'}}" \
-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.6
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','NAME':'mayan','PASSWORD':'mayanuserpass','USER':'mayan','HOST':'mayan-edms-postgres'}}" \
-v /docker-volumes/mayan-edms/media:/var/lib/mayan \
mayanedms/mayanedms:<version>
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
---------------------
The common set of settings can also be modified via environment variables when
using the Docker image. In addition to the common set of settings, some Docker
image specific environment variables are available.
``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).
``MAYAN_USER_UID``
Optional. Changes the UID of the ``mayan`` user internal to the Docker
container. Defaults to 1000.
``MAYAN_USER_GID``
Optional. Changes the GID of the ``mayan`` user internal to the Docker
container. Defaults to 1000.
Included drivers
----------------
The Docker image supports using Redis and RabbitMQ as result backends. For
databases, the image includes support for PostgreSQL and MySQL/MariaDB.
Support for additional brokers or databases may be added using the
``MAYAN_APT_INSTALL`` environment variable.
.. _docker-accessing-outside-data:
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:/scanned_files
The command line would look like this::
docker run ... -v /opt/scanned_files:/scanned_files mayanedms/mayanedms:latest
Now create a watch folder in Mayan EDMS using the path ``/scanned_files``
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 folders. In this example ``/scanned_files`` was used as the
container directory, but any path can be used as long as:
- the path not an already existing path
- the path is not used by any other program
- the path is a single level path
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:/scanned_files 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 cache 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,30 @@
.. _docker-accessing-outside-data:
======================
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:/scanned_files
The command line would look like this::
docker run ... -v /opt/scanned_files:/scanned_files mayanedms/mayanedms:latest
Now create a watch folder in Mayan EDMS using the path ``/scanned_files``
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 folders. In this example ``/scanned_files`` was used as the
container directory, but any path can be used as long as:
- the path not an already existing path
- the path is not used by any other program
- the path is a single level path

View File

@@ -0,0 +1,47 @@
.. _docker_backups:
==================
Performing backups
==================
#. Document files
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:/scanned_files mayanedms/mayanedms:|DOCKER_MAYAN_IMAGE_VERSION|
That would be the ``/docker-volumes/mayan folder``::
sudo tar -zcvf backup.tar.gz /docker-volumes/mayan
sudo chown `whoami` backup.tar.gz
#. Database
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.
- PostgreSQL: https://www.postgresql.org/docs/current/backup-dump.html
- MySQL: https://dev.mysql.com/doc/refman/5.7/en/mysqldump.html
=======================
Restoring from a backup
=======================
#. Document files
Uncompress the backup archive in the original docker volume using::
sudo tar -xvzf backup.tar.gz -C /
#. Database
- PostgreSQL: https://www.postgresql.org/docs/current/backup-dump.html
- MySQL: https://dev.mysql.com/doc/refman/5.7/en/mysqldump.html

View File

@@ -0,0 +1,25 @@
.. _docker_building:
==================
Building the image
==================
Clone the repository with::
git clone |SOURCE_CODE_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 cache 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.

View File

@@ -0,0 +1,10 @@
.. _docker_commands:
=================================
Executing commands on a container
=================================
To perform Mayan EDMS commands in a running container that will take all the
settings from the container, use the following command::
docker exec -ti <container name> /usr/local/bin/entrypoint.sh "/opt/mayan-edms/bin/mayan-edms.py <command>"

View File

@@ -0,0 +1,21 @@
=====================
Customizing the image
=====================
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.

View File

@@ -0,0 +1,30 @@
.. _docker_compose:
====================
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.

View File

@@ -0,0 +1,12 @@
.. _docker_image_drivers:
================
Included drivers
================
The Docker image supports using Redis and RabbitMQ as result backends. For
databases, the image includes support for PostgreSQL and MySQL/MariaDB.
Support for additional brokers or databases may be added using the
``MAYAN_APT_INSTALL`` environment variable.

View File

@@ -0,0 +1,63 @@
.. index:: Docker environment variables
.. _docker_environment_variables:
=====================
Environment Variables
=====================
The common set of settings can also be modified via environment variables when
using the Docker image. In addition to the common set of settings, some Docker
image specific environment variables are available.
``MAYAN_SETTINGS_MODULE``
Optional. Allows loading an alternate settings file.
``MAYAN_GUNICORN_TIMEOUT``
Optional. Changes the amount of time the frontend worker will wait for a
request to finish before raising a timeout error. The default is 120
seconds.
``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).
``MAYAN_USER_UID``
Optional. Changes the UID of the ``mayan`` user internal to the Docker
container. Defaults to 1000.
``MAYAN_USER_GID``
Optional. Changes the GID of the ``mayan`` user internal to the Docker
container. Defaults to 1000.

View File

@@ -0,0 +1,35 @@
.. index:: Docker
======
Docker
======
Docker is a container technology. Containers are a standard unit of software
that packages up code and all its dependencies.
- Installation: :doc:`install_simple` | :doc:`install_docker_network` | :doc:`docker_compose` | :doc:`start_stop`
- Setup: :doc:`environment_variables` | :doc:`drivers`
- Integration: :doc:`accessing_data`
- Development: :doc:`building` | :doc:`customizing` | :doc:`nightly`
- Administration: :doc:`backups` | :doc:`upgrading` | :doc:`commands`
.. toctree::
:hidden:
install_simple
install_docker_network
start_stop
environment_variables
drivers
accessing_data
backups
upgrading
building
customizing
docker_compose
nightly
commands

View File

@@ -0,0 +1,67 @@
.. _docker_install_networked:
================================
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:
.. code-block:: bash
docker network create mayan
#. Launch the PostgreSQL container with the network option and remove the
port binding (``-p 5432:5432``):
.. code-block:: bash
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 \
|DOCKER_POSTGRES_IMAGE_VERSION|
#. Launch the Redis container with the network option and remove the port
binding (``-p 6379:6379``):
.. code-block:: bash
docker run \
-d \
--name mayan-edms-redis \
--network=mayan \
|DOCKER_REDIS_IMAGE_VERSION| \
redis-server \
--databases \
"2" \
--maxmemory-policy \
allkeys-lru \
--save \
""
#. 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``):
.. code-block:: bash
docker run \
-d \
--name mayan-edms \
--network=mayan \
--restart=always \
-p 80:8000 \
-e MAYAN_DATABASES="{'default':{'ENGINE':'django.db.backends.postgresql','NAME':'mayan','PASSWORD':'mayanuserpass','USER':'mayan','HOST':'mayan-edms-postgres'}}" \
-e MAYAN_CELERY_BROKER_URL="redis://mayan-edms-redis:6379/0" \
-e MAYAN_CELERY_RESULT_BACKEND="redis://mayan-edms-redis:6379/1" \
-v /docker-volumes/mayan-edms/media:/var/lib/mayan \
mayanedms/mayanedms:|DOCKER_MAYAN_IMAGE_VERSION|

View File

@@ -0,0 +1,117 @@
.. _docker_install:
==========================
Simple Docker installation
==========================
#. Install Docker:
.. code-block:: bash
wget -qO- https://get.docker.com/ | sh
If you don't want run an automated script, follow the instructions outlined
in their documentation: https://docs.docker.com/install/
Once the Docker installation is finished, proceed to the link below to install
the Docker image for Mayan EDMS.
#. Download the Mayan EDMS Docker image:
With Docker properly installed, proceed to download the Mayan EDMS Docker
image using the command:
.. code-block:: bash
docker pull mayanedms/mayanedms:|DOCKER_MAYAN_IMAGE_VERSION|
#. Download the PostgreSQL Docker image:
.. code-block:: bash
docker pull |DOCKER_POSTGRES_IMAGE_VERSION|
#. Download the Redis Docker image:
.. code-block:: bash
docker pull |DOCKER_REDIS_IMAGE_VERSION|
#. Create and run a PostgreSQL container:
.. code-block:: bash
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 \
|DOCKER_POSTGRES_IMAGE_VERSION|
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.
#. Create and run a Redis container:
.. code-block:: bash
docker run \
-d \
--name mayan-edms-redis \
--restart=always \
-p 6379:6379 \
|DOCKER_REDIS_IMAGE_VERSION| \
redis-server \
--databases \
"2" \
--maxmemory-policy \
allkeys-lru \
--save \
""
The Redis container will have two databases, one for background task messages,
and the other to hold the results of those background tasks. Redis is
configure to not save its content to disk and to automatically clear up
memory.
#. Create and run a Mayan EDMS container:
.. code-block:: bash
docker run \
-d \
--name mayan-edms \
--restart=always \
-p 80:8000 \
-e MAYAN_DATABASES="{'default':{'ENGINE':'django.db.backends.postgresql','NAME':'mayan','PASSWORD':'mayanuserpass','USER':'mayan','HOST':'172.17.0.1'}}" \
-e MAYAN_CELERY_BROKER_URL="redis://172.17.0.1:6379/0" \
-e MAYAN_CELERY_RESULT_BACKEND="redis://172.17.0.1:6379/1" \
-v /docker-volumes/mayan-edms/media:/var/lib/mayan \
mayanedms/mayanedms:|DOCKER_MAYAN_IMAGE_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 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``.

View File

@@ -0,0 +1,12 @@
==============
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:
|SOURCE_CODE_REPOSITORY|container_registry

View File

@@ -0,0 +1,13 @@
===================================
Stopping and starting the container
===================================
To stop the container use::
docker stop mayan-edms
To start the container again::
docker start mayan-edms

View File

@@ -0,0 +1,30 @@
=========
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

View File

@@ -1,3 +1,4 @@
==============
Document types
==============
@@ -67,22 +68,3 @@ 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.
Creating document types
=======================
.. admonition:: Permissions required
:class: warning
The "Create document types" permission is required for this action.
#. Go to the :menuselection:`System --> Setup --> Document types` menu.
#. From the :guilabel:`Actions` dropdown select :guilabel:`Create document type`.
#. Enter a label to be shown to users when using this document type.
#. Optional: Enter a period of time after which documents of this type will be moved to the trash.
#. Optional: Select the unit of time for the period after which the document will be moved to the trash.
#. Optional: Enter a period of time after which documents moved to the trash will be permanently deleted.
#. Optional: Select the unit of time for the period of time after which the documents moved to the trash will be permanently deleted
#. Press :guilabel:`Submit`.

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),

View File

@@ -1,9 +1,9 @@
==============
Index examples
--------------
==============
Index of document types
^^^^^^^^^^^^^^^^^^^^^^^
=======================
.. admonition:: Permissions required
:class: warning
@@ -56,7 +56,7 @@ of types "Invoice" and "Letter", these will now go into the level "Correspondenc
Index document by department, taken from the first character of the invoice number metadata
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
===========================================================================================
Requires one index node with the template::
@@ -66,7 +66,7 @@ Requires one index node with the template::
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
@@ -91,7 +91,7 @@ sub level for months.
Index by OCR content
^^^^^^^^^^^^^^^^^^^^
====================
This example indexes documents in a "quarterly report" level if they have the
fragment “quarterly report” in the OCR text::
@@ -105,21 +105,21 @@ The same applies to text content extracted for the document::
Index documents not found in any cabinet
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
========================================
::
{% if document.cabinets.count == 0 %}No Cabinets{% endif %}
Index documents not tagged
^^^^^^^^^^^^^^^^^^^^^^^^^^
==========================
::
{% 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

@@ -0,0 +1,23 @@
.. index:: Indexes
================
Document indexes
================
Document indexes are a multi level structure similar to folder in a filesystem,
however the hierarchy of the levels is automatically created, updated, or deleted
based on rules set by the administrator.
- :doc:`indexes`
- :doc:`examples`
- :doc:`mirroring`
.. toctree::
:hidden:
indexes
mirroring
examples

View File

@@ -1,10 +1,11 @@
Indexes
=======
===============
Index structure
===============
Indexes are an automatic method to hierarchically organize documents in
relation to their properties (:doc:`../chapters/metadata`, label, MIME type,
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:`../chapters/document_types`.
associate the index to one or more :doc:`../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
@@ -75,41 +76,3 @@ that will be generate based on the tree template would be as follows:
year_1 -> document_3;
}
.. 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
previous example index as follows::
mkdir -p ~/indexes/products
mayan-edms.py mountindex product-sheets-per-year ~/indexes/products
The ``~/indexes/products`` directory will now have a directory and files structure
identical to that of the index. Once indexes are mounted with this command, they
behave like any other filesystem directory and can even be further shared
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,35 @@
=========
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
previous example index as follows::
mkdir -p ~/indexes/products
mayan-edms.py mountindex product-sheets-per-year ~/indexes/products
The ``~/indexes/products`` directory will now have a directory and files structure
identical to that of the index. Once indexes are mounted with this command, they
behave like any other filesystem directory and can even be further shared
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

@@ -1,6 +1,6 @@
*********
=========
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
@@ -31,6 +31,6 @@ Example::
For more information check out the
:ref:`environment variables <environment_variables>` chapter of the
:doc:`../topics/settings` topic.
:doc:`../parts/settings` topic.

View File

@@ -1,12 +1,12 @@
*****************
=================
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`
:doc:`../parts/administration`
Application emails
==================
@@ -14,8 +14,7 @@ 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.
email backends.
Once created mailing profiles allow users to send email messages from
within the user interface containing either an URL link to the document or

View File

@@ -1,99 +0,0 @@
********
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
those types. Metadata types are defined in the setup menu and associated with
document types. Then when a document is uploaded, a value for that metadata
can be entered. There are two kinds of metadata type to document type relations:
optional and required. When a metadata type is optional for a document type,
it can be left blank for a document being uploaded and the upload will still
be successful. On the other hand required metadata type must be given a value
or it will not be possible to upload the document at hand.
Examples of metadata type: Invoice number, color, employee id.
The data entry of metadata types can be set to allow any value to be provided
(the default) or a list of possible values can be entered in the ``Lookup``
configuration option and users will be presented with a drop down list of options
instead of the default text entry box.
If metadata types are setup to allow any value to be entered a ``validation``
option can be chosen to block the entry of invalid data. Metadata types also
provide ``parsers`` which will not block the entry of data but are able to
interpret and modify the value provided by the user to a conform to a specific
format. An example of a provided parser is the date parser which will interpret
and correct dates provided by users regardless of the format in which they are
entered.
Creating metadata types
=======================
.. admonition:: Permissions required
:class: warning
The "Create new metadata types" permission is required for this action.
#. Go to the :menuselection:`System --> Setup --> Metadata types` menu.
#. From the :guilabel:`Actions` dropdown select :guilabel:`Create new`.
#. Provide a name to reference this metadata type in other parts of the system.
#. Enter a label to be shown to users when using this metadata type.
#. Optional: Enter a default value for the metadata type.
#. Optional: Provide a comma separated list of options to restrict the data entry
when using this metadata type.
#. Optional: Select a validator and a parser to validate and cleanup the data
entry when not using a predetermined list of values.
#. Press :guilabel:`Submit`.
Assigning a metadata type to a document type
============================================
.. admonition:: Permissions required
:class: warning
- The "Edit metadata types" permission is required for this action, globally or
via an ACL for a metadata type.
- Also the "Edit document type" permission
is required, globally or via an ACL for a document type.
This action can be performed in two ways.
Option 1: Via the metadata type view
------------------------------------
#. Go to the :menuselection:`System --> Setup --> Metadata types` menu.
#. Click on the button :guilabel:`Document types` of the metadata type you which
to associate.
#. From the list of existing document types press either:
- :guilabel:`None` if this metadata type will not be available for documents
of the type.
- :guilabel:`Optional` if this metadata type will be available and is
optional to provide a value for documents of the type.
- :guilabel:`Required` if this metadata type will be available and is
required to provide a value for documents of the type.
#. Press :guilabel:`Save`.
Option 2: Via the document type view
------------------------------------
#. Go to the :menuselection:`System --> Setup --> Document types` menu.
#. Click on the button :guilabel:`Metadata types` of the metadata type you which
to associate.
#. From the list of existing metadata types press either:
- :guilabel:`None` if this metadata type will not be available for documents
of the type.
- :guilabel:`Optional` if this metadata type will be available and is
optional to provide a value for documents of the type.
- :guilabel:`Required` if this metadata type will be available and is
required to provide a value for documents of the type.
#. Press :guilabel:`Save`.

View File

@@ -0,0 +1,28 @@
========
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
those types. Metadata types are defined in the setup menu and associated with
document types. Then when a document is uploaded, a value for that metadata
can be entered. There are two kinds of metadata type to document type relations:
optional and required. When a metadata type is optional for a document type,
it can be left blank for a document being uploaded and the upload will still
be successful. On the other hand required metadata type must be given a value
or it will not be possible to upload the document at hand.
Examples of metadata type: Invoice number, color, employee id.
The data entry of metadata types can be set to allow any value to be provided
(the default) or a list of possible values can be entered in the ``Lookup``
configuration option and users will be presented with a drop down list of options
instead of the default text entry box.
If metadata types are setup to allow any value to be entered a ``validation``
option can be chosen to block the entry of invalid data. Metadata types also
provide ``parsers`` which will not block the entry of data but are able to
interpret and modify the value provided by the user to a conform to a specific
format. An example of a provided parser is the date parser which will interpret
and correct dates provided by users regardless of the format in which they are
entered.

View File

@@ -1,31 +0,0 @@
**************
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.

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 subclasses the
use other engines. To support other engines create 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``

View File

@@ -1,6 +1,6 @@
**************
==============
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
@@ -27,7 +27,7 @@ Example::
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.
:doc:`../parts/settings` topic.
To test the email settings use the management command ``sendtestemail``.
Example::

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

View File

@@ -1,70 +0,0 @@
************
Quick labels
************
Quick labels are predetermined filenames that allow the quick renaming of
documents as they are uploaded or after they have been uploaded.
Quick labels are added and associated to a document type.
Example of quick label: Invoice, Receipt from X store, Purchase order.
It is possible to preserve the file extension when using quick labels.
Extensions are required for some operating system to be able to detect the
correct file type to access the content.
For example if a document file is named "file0001.pdf" and the quick label
"Receipt from X store" is applied, the resulting document label will be
"Receipt from X store.pdf".
Creating quick labels
=====================
.. admonition:: Permissions required
:class: warning
The "Edit document types" permission is required for this action, either
globally or via an ACL for a document type.
Since quick labels are associated with document types, creating quick labels
must be done from the document type view.
#. Go to the :menuselection:`System --> Setup --> Document types` menu.
#. In the document type list, click on the :guilabel:`Quick labels` button of
the document type for which you wish to create a quick label.
#. In the view titled "Quick labels for document type: <your document type>",
from the :guilabel:`Actions` dropdown select :guilabel:`Add quick label to document type`.
#. At the quick label creation form enter the desired label and press :guilabel:`Save`.
Using quick labels during upload
================================
#. Use the new document upload wizard from :menuselection:`Documents --> New document`.
#. Select a document type and navigate to the penultimate step, where you have
the option to drag and drop files to upload.
#. Select a an option from the :guilabel:`Quick document rename` dropdown.
#. Optionally select the :guilabel:`Preserve extension` checkbox to keep the file
extension.
#. Upload your documents.
Using quick labels for existing documents
=========================================
.. admonition:: Permissions required
:class: warning
The "Edit document properties" permission is required for this action, either
globally or via an ACL for a document or document type.
#. Navigate to the document preview view of the document to rename. Make sure
quick labels for the document type of the document select have been created.
#. From the :guilabel:`Actions` dropdown select :guilabel:`Edit Properties`.
#. Select a an option from the :guilabel:`Quick document rename` dropdown.
#. Optionally select the :guilabel:`Preserve extension` checkbox to keep the file
extension.
#. Press :guilabel:`Save` to rename the document.

View File

@@ -0,0 +1,18 @@
============
Quick labels
============
Quick labels are predetermined filenames that allow the quick renaming of
documents as they are uploaded or after they have been uploaded.
Quick labels are added and associated to a document type.
Example of quick label: Invoice, Receipt from X store, Purchase order.
It is possible to preserve the file extension when using quick labels.
Extensions are required for some operating system to be able to detect the
correct file type to access the content.
For example if a document file is named "file0001.pdf" and the quick label
"Receipt from X store" is applied, the resulting document label will be
"Receipt from X store.pdf".

View File

@@ -1,6 +1,6 @@
***
API
***
========
REST API
========
Mayan EDMS provides an HTTP REST Application Program Interface (or API). This
API allows integration with 3rd party software using simple HTTP requests.
@@ -8,7 +8,7 @@ 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
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
@@ -57,7 +57,7 @@ Get a list of document types::
Upload a new document::
with open('test_document.pdf', mode='rb') as
with open('test_document.pdf', mode='rb') as file_object:
requests.post('http://127.0.0.1:8000/api/documents/', auth=('username', 'password'), files={'file': file_object}, data={'document_type': 1}).json()
{u'description': u'',

View File

@@ -1,155 +0,0 @@
**********
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. Each worker will handle
queues based on the latency required by each queue group.
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.

View File

@@ -1,6 +1,6 @@
********
========
Settings
********
========
Mayan EDMS can be configure via environment variables or by setting files.
@@ -14,7 +14,7 @@ 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),
the number of documents displayed per page (``COMMON_PAGINATE_BY``, by default 40),
use::
export MAYAN_COMMON_PAGINATE_BY=10
@@ -32,8 +32,8 @@ 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::
``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
@@ -58,16 +58,18 @@ to be valid. You can revert manually by copy the file or by using the
Via Python settings files
=========================
Another way to configure Mayan EDMS is via Python-style, settings files.
Another way to configure Mayan EDMS and the one required when more extensive
setup is required, such as when using external Python libraries, 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``.
``|MAYAN_MEDIA_ROOT|/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
according to the :doc:`../chapters/docker/index` instructions provided in this
documentation your ``mayan_settings`` folder should be located in the directory:
``/docker-volumes/mayan/mayan_settings``.
@@ -80,7 +82,7 @@ Create a file with any valid name and a ``.py`` extension in the
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),
per page (``COMMON_PAGINATE_BY``, by default 40),
use::
COMMON_PAGINATE_BY=10
@@ -100,13 +102,24 @@ 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
|MAYAN_BIN| 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
To make the use of the custom Python setting file permanent, update the ``|MAYAN_SUPERVISOR_CONF|``
file. In the ``[supervisord]`` section, update the ``environment=`` value of
``DJANGO_SETTINGS_MODULE`` from the default ``mayan.settings.production`` to
``mayan.media.mayan_settings.mysettings``. Pay attention to the indentation of
the ``environment=`` entries.
Force supervisor to read the changes and restart using::
sudo supervisorctl reread
sudo supervisorctl restart all
For the :doc:`../chapters/docker/index` 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::

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

View File

@@ -1,3 +1,4 @@
===========
Smart links
===========
@@ -6,7 +7,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:`../chapters/indexes`.
document, but they each belong to their own :doc:`../chapters/indexes/index`.
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,3 +1,4 @@
=======
Sources
=======
@@ -62,19 +63,3 @@ manager system.
If you deployed a Mayan EDMS Docker container and want to use watched folders
or staging folder, refer to the Docker chapter :ref:`docker-accessing-outside-data`.
Creating new sources
====================
.. admonition:: Permissions required
:class: warning
The "Create new document sources" permission is required for this action.
#. Go to the :menuselection:`System --> Setup --> Sources` menu.
#. From the :guilabel:`Actions` dropdown select the new type of source to create.
#. Each source type will have different fields to customize its behavior. Enter
the required information in each field based on the help text provided.
#. Press :guilabel:`Save`.

View File

@@ -1,46 +0,0 @@
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.
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.
Creating tags
=============
.. admonition:: Permissions required
:class: warning
The "Create new tags" permission is required for this action.
#. Go to the :menuselection:`Tags --> Create` menu.
#. Enter a label to identify the tag.
#. Select a color for the tag.
#. Press :guilabel:`Submit`.
View all tags
=============
.. admonition:: Permissions required
:class: warning
The "View tags" permission is required for this action, globally or via an
ACL for a tag.
#. Go to the :menuselection:`Tags --> All` menu.

11
docs/chapters/tags.txt Normal file
View File

@@ -0,0 +1,11 @@
====
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.
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.

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.
@@ -17,5 +17,5 @@ menu will have a new option that reads "Create new transformation". Currently,
the available transformations are: rotation, zoom, crop, and resize. Once the
document image has been corrected, resubmit it for OCR for improved results.
Transformations are not destructive and do not physically modify the document
Transformations are non destructive and do not physically modify the document
file, they just modify the document's graphical representation.

View File

@@ -1,84 +0,0 @@
*************
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

@@ -1,6 +1,6 @@
*******************
===================
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
@@ -46,35 +46,3 @@ There is no limit to the number of versions a document can have.
By default, the last version will be showed when working with the document
but any of the versions can be inspected and viewed.
View a document version list
============================
.. admonition:: Permissions required
:class: warning
The "View documents' versions list" permission is required for this action,
either globally or via an ACL for a document or document type.
#. Navigate to the select document's preview view.
#. Click on the sibebar's :guilabel:`Versions` button.
Uploading a new document version
================================
.. admonition:: Permissions required
:class: warning
The "Create new document versions" permission is required for this action,
either globally or via an ACL for a document or document type.
#. Navigate to the select document's versions list view.
#. From the :guilabel:`Actions` dropdown select :guilabel:`Upload new version`.
#. Optionally type a comment explaining the changes in the new version.
#. Press the :guilabel:`Browse` button and select a new file.
#. Press :guilabel:`Save` upload the new version.

View File

@@ -1,6 +1,6 @@
*********
=========
Workflows
*********
=========
Introduction
============

View File

@@ -13,39 +13,49 @@ 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
from docutils.parsers.rst import directives
sys.path.insert(0, os.path.abspath('..'))
sys.path.insert(1, os.path.abspath('.'))
import mayan
import callbacks
import patches
import utils
# 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 = ['sphinx.ext.autodoc', 'sphinx.ext.viewcode', 'sphinx.ext.intersphinx']
extensions = [
'sphinx.ext.extlinks', 'sphinxcontrib.blockdiag', 'sphinxcontrib.spelling'
'sphinx_sitemap', 'sphinx.ext.extlinks', 'sphinxcontrib.blockdiag',
'sphinxcontrib.spelling',
]
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']
# The suffix of source filenames.
source_suffix = '.rst'
source_suffix = '.txt'
# The encoding of source files.
# source_encoding = 'utf-8-sig'
@@ -69,20 +79,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
@@ -99,38 +109,40 @@ 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 ---------------------------------------------------
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
html_theme = 'classic'
html_theme = 'sphinx_rtd_theme'
# 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 = {
'analytics_id': 'UA-52965619-6'
}
# 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,
@@ -139,89 +151,89 @@ 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 = False
# 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 --------------------------------------------
@@ -233,8 +245,6 @@ man_pages = [
[mayan.__author__], 1)
]
html_theme = 'sphinx_rtd_theme'
# -- External links --
extlinks = {
'django-docs': (
@@ -250,8 +260,52 @@ extlinks = {
),
'gitlab-issue': (
'https://gitlab.com/mayan-edms/mayan-edms/issues/%s', 'GitLab issue #'
),
'gitlab-merge': (
'https://gitlab.com/mayan-edms/mayan-edms/merge_requests/%s',
'GitLab merge request #'
)
}
# -- Options for sitemap extension ---------------------------------------------
html_baseurl = 'https://docs.mayan-edms.com/'
def setup(app):
app.add_stylesheet('css/custom.css')
BASE_DIRECTORY = '/opt/'
MAYAN_INSTALLATION_DIRECTORY = os.path.join(BASE_DIRECTORY, 'mayan-edms')
MAYAN_MEDIA_ROOT = os.path.join(MAYAN_INSTALLATION_DIRECTORY, 'media')
MAYAN_PYTHON_BIN_DIR = os.path.join(MAYAN_INSTALLATION_DIRECTORY, 'bin')
MAYAN_GUNICORN_BIN = os.path.join(MAYAN_PYTHON_BIN_DIR, 'gunicorn')
MAYAN_PIP_BIN = os.path.join(MAYAN_PYTHON_BIN_DIR, 'pip')
MAYAN_BIN = os.path.join(MAYAN_PYTHON_BIN_DIR, 'mayan-edms.py')
SUPERVISOR_ETC_PATH = '/etc/supervisor/conf.d/'
MAYAN_SUPERVISOR_CONF = os.path.join(SUPERVISOR_ETC_PATH, 'mayan.conf')
environment_variables = utils.load_env_file()
environment_variables['DOCKER_MAYAN_IMAGE_VERSION'] = mayan.__version__
environment_variables['MAYAN_INSTALLATION_DIRECTORY'] = MAYAN_INSTALLATION_DIRECTORY
environment_variables['MAYAN_MEDIA_ROOT'] = MAYAN_MEDIA_ROOT
environment_variables['MAYAN_PYTHON_BIN_DIR'] = MAYAN_PYTHON_BIN_DIR
environment_variables['MAYAN_GUNICORN_BIN'] = MAYAN_GUNICORN_BIN
environment_variables['MAYAN_BIN'] = MAYAN_BIN
environment_variables['MAYAN_PIP_BIN'] = MAYAN_PIP_BIN
environment_variables['SUPERVISOR_ETC_PATH'] = SUPERVISOR_ETC_PATH
environment_variables['MAYAN_SUPERVISOR_CONF'] = MAYAN_SUPERVISOR_CONF
substitutions = utils.generate_substitutions(
dictionary=environment_variables
)
app.add_stylesheet(filename='css/custom.css')
app.connect(
event='source-read', callback=callbacks.get_source_read_callback(
substitutions=substitutions
)
)
directives.register_directive(
name='include', directive=patches.monkey_patch_include(
substitutions=substitutions
)
)
utils.patch_theme_template(app, templates_path=templates_path[0])

View File

@@ -17,28 +17,32 @@ repository for electronic documents.
.. toctree::
:hidden:
topics/features
topics/installation
parts/features
parts/installation
releases/index
topics/getting_started
topics/adding_documents
topics/access_control
topics/categorization
topics/collaboration
topics/settings
topics/storage
topics/integration
topics/docker
topics/advanced
topics/administration
topics/troubleshooting
topics/development
topics/faq
topics/license
topics/contact
parts/getting_started
parts/access_control
parts/categorization
parts/collaboration
parts/settings
parts/storage
chapters/rest_api
chapters/docker/index
parts/advanced
parts/administration
parts/troubleshooting
chapters/development/index
parts/faq
parts/license
parts/contact
.. _Docker: https://www.docker.com/
.. _Django: http://www.djangoproject.com/
.. _Free Open Source: http://en.wikipedia.org/wiki/Open_source
.. _Electronic Document Management System: https://en.wikipedia.org/wiki/Document_management_system
.. _Apache 2.0 License: https://www.apache.org/licenses/LICENSE-2.0.txt
..
parts/adding_documents

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