Merge remote-tracking branch 'origin/master' into merge_master

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
This commit is contained in:
Roberto Rosario
2017-05-24 15:02:36 -04:00
10 changed files with 169 additions and 9 deletions

View File

@@ -4,6 +4,13 @@
- Content windows appearance changes - Content windows appearance changes
- Add new document's version list view permission - Add new document's version list view permission
2.2.1 (2017-05-25)
==================
- Allow for bigger indexing expression templates.
- Auto select checkbox when updating metadata values. GitLab issue #371.
- Added support for passing the options allow-other and allow-root to the
FUSE index mirror. GitLab issue #385
2.2 (2017-04-26) 2.2 (2017-04-26)
================ ================
- Remove the installation app (GitLab #301). - Remove the installation app (GitLab #301).

78
docs/releases/2.2.1.rst Normal file
View File

@@ -0,0 +1,78 @@
===============================
Mayan EDMS v2.2.1 release notes
===============================
Released: May 25, 2017
What's new
==========
This is a bug-fix and minor feature release and all users are encouraged to
upgrade.
Changes
-------------
- Index node expression template field changed from a 128 character field to an
unlimited size text field to allow for complex indexing expressions.
- When updating the metadata of a document, any input in the value form field
will select the adjacent checkbox.
- Support for passing the FUSE option `allow-other` and `allow-root` was added
to the index mirroring management command.
Removals
--------
* None
Upgrading from a previous version
---------------------------------
Using PIP
~~~~~~~~~
Type in the console::
$ pip install -U mayan-edms
the requirements will also be updated automatically.
Using Git
~~~~~~~~~
If you installed Mayan EDMS by cloning the Git repository issue the commands::
$ git reset --hard HEAD
$ git pull
otherwise download the compressed archived and uncompress it overriding the
existing installation.
Next upgrade/add the new requirements::
$ pip install --upgrade -r requirements.txt
Common steps
~~~~~~~~~~~~
Migrate existing database schema with::
$ mayan-edms.py performupgrade
Add new static media::
$ mayan-edms.py collectstatic --noinput
The upgrade procedure is now complete.
Backward incompatible changes
=============================
* None
Bugs fixed or issues closed
===========================
* `GitLab issue #371 <https://gitlab.com/mayan-edms/mayan-edms/issues/371>`_ Auto select checkbox when updating metadata
* `GitLab issue #385 <https://gitlab.com/mayan-edms/mayan-edms/issues/385>`_ mountindex: how to specify FUSE mount option allow_other?
.. _PyPI: https://pypi.python.org/pypi/mayan-edms/

View File

@@ -22,6 +22,7 @@ versions of the documentation contain the release notes for any later releases.
.. toctree:: .. toctree::
:maxdepth: 1 :maxdepth: 1
2.2.1
2.2 2.2
2.1.11 2.1.11
2.1.10 2.1.10

View File

@@ -126,3 +126,10 @@ dependent support Python 3 then will the project move to fully support Python 3.
Make sure that the Celery BEAT scheduler is running correctly as it is the element Make sure that the Celery BEAT scheduler is running correctly as it is the element
that triggers the periodics tasks. that triggers the periodics tasks.
**Q: How to do LDAP authentication**
A sample settings file called ldap_connection_settings.py is included in the
contrib/settings/ folder of the repository showing how to setup LDAP
authentication.

View File

@@ -33,6 +33,17 @@
{% block stylesheets %}{% endblock %} {% block stylesheets %}{% endblock %}
{% endcompress %} {% endcompress %}
<script>
function waitForJQuery(func) {
if (window.jQuery) {
func();
} else {
setTimeout(function() {
waitForJQuery(func)
}, 50);
}
}
</script>
</head> </head>
<body> <body>
{% if appearance_type == 'plain' %} {% if appearance_type == 'plain' %}

View File

@@ -0,0 +1,20 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.10.6 on 2017-05-24 04:56
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('document_indexing', '0010_documentindexinstancenode_indexinstance'),
]
operations = [
migrations.AlterField(
model_name='indextemplatenode',
name='expression',
field=models.TextField(help_text="Enter a template to render. Use Django's default templating language (https://docs.djangoproject.com/en/1.7/ref/templates/builtins/)", verbose_name='Indexing expression'),
),
]

View File

@@ -114,8 +114,7 @@ class IndexTemplateNode(MPTTModel):
index = models.ForeignKey( index = models.ForeignKey(
Index, related_name='node_templates', verbose_name=_('Index') Index, related_name='node_templates', verbose_name=_('Index')
) )
expression = models.CharField( expression = models.TextField(
max_length=128,
help_text=_( help_text=_(
'Enter a template to render. ' 'Enter a template to render. '
'Use Django\'s default templating language ' 'Use Django\'s default templating language '

View File

@@ -16,11 +16,16 @@ class DocumentMetadataForm(forms.Form):
label=_('Name'), required=False, label=_('Name'), required=False,
widget=forms.TextInput(attrs={'readonly': 'readonly'}) widget=forms.TextInput(attrs={'readonly': 'readonly'})
) )
value = forms.CharField(label=_('Value'), required=False) value = forms.CharField(label=_('Value'), required=False,
widget=forms.TextInput(attrs={'class': 'metadata-value'})
)
update = forms.BooleanField( update = forms.BooleanField(
initial=True, label=_('Update'), required=False initial=True, label=_('Update'), required=False
) )
class Media:
js = ('metadata/js/metadata_form.js',)
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
super(DocumentMetadataForm, self).__init__(*args, **kwargs) super(DocumentMetadataForm, self).__init__(*args, **kwargs)

View File

@@ -0,0 +1,11 @@
'use strict';
waitForJQuery(function() {
jQuery(document).ready(function() {
$('.metadata-value').on('input', function(event) {
// Check the checkbox next to a metadata value input when there is
// data entry in the value's input.
$(event.target).parents('tr').find(':checkbox').prop('checked', true);
});
});
});

View File

@@ -11,6 +11,7 @@ from fuse import FUSE, FuseOSError, Operations
from django.core import management from django.core import management
from django.core.cache import caches from django.core.cache import caches
from django.core.exceptions import MultipleObjectsReturned from django.core.exceptions import MultipleObjectsReturned
from django.core.management.base import CommandError
from django.db.models import Count from django.db.models import Count
from document_indexing.models import Index, IndexInstanceNode from document_indexing.models import Index, IndexInstanceNode
@@ -214,15 +215,35 @@ class Command(management.BaseCommand):
def add_arguments(self, parser): def add_arguments(self, parser):
parser.add_argument('slug', nargs='?', help='Index slug') parser.add_argument('slug', nargs='?', help='Index slug')
parser.add_argument('mount_point', nargs='?', help='Mount point') parser.add_argument('mount_point', nargs='?', help='Mount point')
parser.add_argument(
'--allow-other', action='store_true', dest='allow_other',
default=False,
help='All users (including root) can access the index files.'
)
parser.add_argument(
'--allow-root', action='store_true', dest='allow_root',
default=False,
help='Mount access is limited to the user mounting the index and '
'root. This option and --allow-other are mutually exclusive.'
)
def handle(self, *args, **options): def handle(self, *args, **options):
if not options.get('slug') or not options.get('mount_point'): if not options.get('slug') or not options.get('mount_point'):
self.stderr.write(self.style.ERROR('Incorrect number of arguments')) self.stderr.write(self.style.ERROR('Incorrect number of arguments'))
exit(1) exit(1)
try:
FUSE( FUSE(
operations=IndexFS(index_slug=options['slug']), operations=IndexFS(index_slug=options['slug']),
mountpoint=options['mount_point'], nothreads=True, foreground=True mountpoint=options['mount_point'], nothreads=True, foreground=True,
allow_other=options['allow_other'],
allow_root=options['allow_root']
) )
except RuntimeError as exception:
if options['allow_other'] or options['allow_root']:
raise CommandError(
'Make sure \'user_allow_other\' is set in /etc/fuse.conf'
)
else:
raise