Update the Key model's sign_file method to raise the NeedPassphrase
exception when GPG has no terminal available and not just when the
GPG backend specifically asks for a passphrase.
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
Refactor the accesors to behave like methods instead of properties.
This means all accesors will be prepended with the string
"get_" and will include a set of parenthesis.
Improve the ModeAttribute class to use the method's
short_description. This commit also adds support for a
new method .help_text attribute has been added.
Move accessors to their own module, named "methods.py".
Remove the PropertyHelper class as the accessors no longer
need it.
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
Add keyword arguments to all called instances of PermissionNamespace.
Sort name and label arguments.
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
Merge all document type selection forms into a single smarter form
that can perform permission filtering and allow single or multiple
selections.
This commit also add the document type selection for submit
view to the file metadata app.
This commit also updates the document type selection views
for the OCR, document parsing, and upload wizard to use
the new document type selection form and removes their
respective document type selection forms.
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
Split the documents/forms.py into sub modules for each logical
unit: types, document, pages, versions.
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
Now that the automatic OCR, parsing and file metadata processing
are turned off by the test setting file, these overrides in the
tests are not needed anymore.
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
The base test file now turns off OCR, parsing and file metadata
processing. Apps that rely on those must now turn them on
explicitly.
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
Add the file metadata app. This app uses binary wrappers called drivers
to extract properties from the file of documents. The default driver
uses the exiftool to extract the EXIF record from JPEG images.
The exiftool can also extra some properties from other files like
PDFs, office files and sound file.
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
Add support to the SourceColumn class to resolve related fields
using the double underscore as separator. Columns that use related
no longer have to use throw away lambdas.
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
Add message body display when the Django debug flag is True.
Add a CSS to simulate the appearence and legibility of the
debug message.
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
Remove markup in the base.html template to render the Actions dropdown
and use instead the built in navigation/generic_navigation.html
template.
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
Add icons to document version action links. Add icons to
detached and embedded signing action links.
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
Remove the fade in animation in document thumbnails. Tweak
the match height refresh interval to reduce scrollbar
jitter in Firefox. Change the fancybox display animation from
zoom to fade in.
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
Convert the volatile permission reference in the stored permission
model from a method to a property to allow future caching optimization.
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
The document parsing was being turned off in the OCR tests
by setting the binary to an invalid value. A proper way
to disable automatic parsing was added in a previous commit
and this commit updates the test case class to use that method.
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
Update some view tests in the tags, sources and linking apps
to use the test case classes provided by the common app.
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
Instead of capturing the form save exceptions in the subclass
let the base class do the work.
Use the base class get_instance_extra_data method to avoid
some code repetition.
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
Update the generic single object create and edit views to display
critical exceptions instead of just raising them and stoping
execution. The should allow removing duplicated exception to message
code in subclasses of these views.
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
These features were for Celery 4.2.1, since this version
has a regression, version 4.1.1 is used instead.
The version 4.2.1 features are removed also and implemented
in code.
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
Upgrade Celery version used from 3.1.26 to 4.1.1. The following
settings have been renamed: CELERY_ALWAYS_EAGER to
CELERY_TASK_ALWAYS_EAGER, BROKER_URL to CELERY_BROKER_URL.
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
Pillow was being initialized on import. This commit
moves the initialization to the __init__ method of the
Python backend subclass.
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
Squash together the following migrations:
- Common: 0010 to 0011
- Documents: 0029 to 0037
- Documents: 0042 to 0043
- Tags: 0001 to 0008
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
Extract the new smart file caching code from the common app
and convert it into its own new app called file_caching.
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
Split the .model module from the document app into separate
modules by purpose. The new modules containing the documents
app models are: document_models.py, document_page_models.py,
document_type_models.py, and document_version_models.py.
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
Prepend "operation_" to the data migration functions
for clear purpose. Add keyword arguments to the RunPython
migration opration.
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
Several tests cause errors on purpose to test behaviors.
This commit mute these tests setting their debug level
to critical or by using a context manager to null their
stdout descriptor.
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
Change the use of the list/zip combinarion to generate
the full list of metadata lookup choices to a generator.
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
Incorporate the external django-autoadmin app as a core app
and convert it into a Mayan app. This change adds the new
settings: "COMMON_AUTOADMIN_EMAIL", "AUTOADMIN_PASSWORD", and
"AUTOADMIN_USERNAME".
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
Add a new view to display the events of the current user.
The link to this view is added to the user menu in the main menu
bar.
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
The HOME_VIEW setting is not a Django setting but a setting from the
common app. Move the HOME_VIEW to the COMMON namespace and rename it
to COMMON_HOME_VIEW.
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>