Mayan EDMS v4.2 Release Notes

Release Date: 2022-02-12 // about 2 years ago
    • ⚡️ Update Django to version 3.2.11.
    • ⚡️ Update django-widget-tweaks from version 1.4.8 to 1.4.9.
    • ⚡️ File staging sources updates:

      • Use StreamingHttpResponse to serve previews.
      • Support office document files for preview.
      • Fix extra brackets in the encoded and cached filenames.
      • Simplify image generation.
      • Use context manager to ensure preview images are always closed.
    • Hide all links that depend on users being authenticated.

    • ➕ Add support for return binary content in batch API requests as a base64 string.

    • ➕ Add support for dynamic field API serialization. This feature adds the URL query keys _fields_only and _fields_exclude. Nested serializers are supported using the double underscore (__) separator.

    • 🔨 Refactor ResolverRelatedManager.

    • 🐳 Move Docker templates to their own folder.

    • ⚡️ Move the docker-dockerfile-update target to the Docker makefile.

    • ⚡️ Update Docker image tags:

      • Postgresq from 10.18-alpine to 12.9-alpine.
      • Python from 3.8-slim to 3.11-slim.
    • ⚡️ Update psycopg2 from version 2.8.6 to 2.9.2.

    • ⚡️ Update redis client from version 3.5.3 to 4.0.2.

    • Reduce the Sentry client default traces_sample_rate from 0.25 to 0.05.

    • 🎉 Add the run_initialsetup_or_performupgrade command to the Docker entrypoint.

    • ⚡️ Docker Compose updates:

      • Add a Redis profile.
      • Default to RabbitMQ a broker.
      • Change default RabbitMQ image from 3.9-alpine to 3.9-management-alpine.
      • Improve Traefik configuration.
      • Add a dedicated network for Traefik.
    • 0️⃣ Completed the Whoosh backend and made it the default search backend.

      • Ensure all test models are deleted, including intermediate many to many models created automatically.
      • Update DetailForm usage for the new interface.
      • Move flatten_list to the common app.
      • ResolverPipeline updates:
        • Support resolver_extra_kwargs.
        • Add queryset exclusion support to ResolverRelatedManager.
      • Update related field resolution using pure Django
      • Solve all search indexing edge cases.
      • Models are indexed using smaller tasks to improve scalability.
      • Refactor ResolverRelatedManager. Use Django's internal get_fields_from_path for related field introspection. Support more related field cases.
      • Trigger indexing on related model changes
      • Fix lock manager management command test.
      • Don't index None values in lists.
      • Unify the search test mixins.
      • Use TemporaryDirectory for test search backend. Do automatic clean up of the temporary index directory.
      • Remove the separate related model index signal handlers.
      • Make Whoosh the default search backend.
      • Support reverse many to many indexing.
      • Add indexing optimizations.
      • Rename methods for clarity.
      • Move the any_to_bool function to the common app.
    • ⚡️ Update base image from Debian 10.10-slim to 11.1-slim.

    • 🚚 Move the parse_range utility from the documents app to the common app.

    • 👻 Retry Whoosh LockErrors by encapsulating then in the general app exception DynamicSearchRetry.

    • Added the search_index_objects management command to trigger the queuing of search models from the CLI.

    • ➕ Added the search_status management command to show indexing status of the search backend.

    • 🚚 Move SQLite check to the databases app.

    • ➕ Add support for inclusion and exclusion regular expressions for watch folders. Closes GitLab issue #965. Thanks to Sven Gaechter (@sgaechter) for the request.

    • ⚡️ MIME type app updates:

      • Add support for MIME type detection backends.
      • Add PERL mimetype backend.
      • Add Linux file command backend.
      • Rename mimetype app to mime_types.
    • ➕ Add a search backend for Elastic Search.

    • ⚡️ Search app updates:

      • Support initializing the search backends.
      • Add method to reset backends.
      • Moved get_resolved_field_map and get_search_model_fields to the SearchBackend class.
      • Normalize true values for scope 0 match_all.
      • Added a new task task_reindex_backend to abstract backend reindexing.
      • Add constant maximum retries value to the task_deindex_instance and task_index_instance tasks.
      • Add ranged search model indexing.
      • Add the search_slow queue for long running search tasks.
      • Support backend initialization, reset, and tear down.
      • Automatically add the id field as a search field for all search models.
      • Separate backend initialization from app initialization.
    • ➕ Add Elasticsearch test container makefile targets.

    • Unify the files .env and env_file.

    • Switch all standalone containers to use a prefetch-multiplier of 1.

    • 🔄 Change the Docker Compose network name from bridge to mayan.

    • 🎉 Add the search_initialize and search_upgrade management commands. These are called automatically after the initial setup and after upgrades.

    • Add new search settings called SEARCH_INDEXING_CHUNK_SIZE to set the number of objects to prepare when performing bulk indexing.

    • 📇 Metadata validation and parsing updates:

      • Expand the parser and validator path fields to 224 characters.
      • Add automatic registration of parsers and validators.
      • Add support for passing arguments to parsers and validators.
      • Add a regular expression parser to replace values and a regular expression validator.
    • 🔨 Authentication refactor:

      • Subclass Django's authentication views to add multi form and multi factor authentication.
      • Add support for authentication backends. Authentication backends are able to control and customize the entire login process, including the forms presented to the user. Authentication backends can use mixins and can be subclassed to mix and expand their capabilities. Included authentication mixins: AuthenticationBackendRememberMeMixin Included authentication backends: AuthenticationBackendModelDjangoDefault, AuthenticationBackendModelEmailPassword, AuthenticationBackendModelUsernamePassword. Apps define authentication backends in the module authentication_backends.py.
      • Removed the now unused EmailAuthBackend class.
      • New settings:
      • AUTHENTICATION_BACKEND which must be the dotted path to the backend used to process user authentication.
      • AUTHENTICATION_BACKEND_ARGUMENTS which is an optional YAML structure to pass to the authentication backend.
    • ➕ Add Time based One Time Password (TOTP) support. To enable set the setting AUTHENTICATION_BACKEND to mayan.apps.authentication_otp.authentication_backends.AuthenticationBackendModelUsernamePasswordTOTP for username and TOTP login. For email and TOTP logins use mayan.apps.authentication_otp.authentication_backends.AuthenticationBackendModelEmailPasswordTOTP. New management commands to support OTP:

      • authentication_otp_disable: disables OTP for a user
      • authentication_otp_initialize: initializes the OTP state data for all users. This command is for debuging and maintenance in case the database migration does not correctly initialize the OTP state data for existing users.
      • authentication_otp_status: display the OTP status for a user
    • ➕ Add URL links to the document file and document version first pages to the document serializer in the API.

    • Convert the download file deletion interval into a setting named DOWNLOAD_FILE_EXPIRATION_INTERVAL which defaults to 2 days.

    • Convert the shared uploaded file deletion interval into a setting named SHARED_UPLOADED_FILE_EXPIRATION_INTERVAL which defaults to 7 days.

    • Don't display API URL links to indexing instance and template parents that are also root nodes as these are not accessible.

    • Register more models using DynamicSerializerField to display the canonical serializer of the model when referenced by other objects.

    • 👍 For object that have children objects or that support nesting, the parent object ID is now added to the serializer. The layout is {parent object name}_id. A few objects already provided the parent ID but with a different schema. These objects also now have the parent ID field with the new schema even if it displays a duplicate value. The old ID field is now deprecated and will be removed in version 5.0.

    • ➕ Added a workflow state column displaying all created actions labels separated by a comma.

    • ➕ Added the mailing profile created and edited events.

    • ⚡️ User menu and views updates:

      • Reorganize all user links under a single "User details" link.
      • Allow editing the locale profile of users.
      • Allow editing the theme settings of users.
      • Unify user data related views.
      • Add "User theme edited" and "User locale profile edited" events.
    • ⚡️ Update the Django debug view CSS and layout to match Django's original appearance.

    • 👌 Support Django debug JavaScript code.

    • Minor CSS optimization to the Django debug view.

    • ➕ Add Docker Compose password randomizer.

    • Include LDAP libraries and Python modules.

    • ⚡️ Events app updates:

      • Use the correct attribute for fetching event types. Use id instead of name.
      • Cache the event type instance in the StoredEvent model.
      • An incorrect event type ID will now return a KeyError instead of masking the exception and returning an error message. It is now up to the calling code which action to take when the event type ID is not correct.
      • The previous unknown event error message is now available as a literal named literals.TEXT_UNKNOWN_EVENT_ID.
    • ➕ Add workflow template transition trigger API. Closes GitLab issue #1044. Thanks to Ludovic Anterieur (@lanterieur) for the request and research.

    • Fine tune workflow template permissions to require the view permission instead of the edit permission when applicable.

    • ⚡️ Error log updates:

      • Added a global error log list to the tools menu.
      • Error log partitions now link to their underline object via content type too.
      • Error log partitions are now retrieve or created on demand.
      • Added cascade permission support to error log partitions and entries.
    • ⚡️ Update the ObjectActionAPIView view to allow passing extra context to serializers.

    • ➕ Add support for launching workflows from the API.

    • 🔨 Refactor language activation to work with Django 3.2.

    • ➕ Added the mailing profile created and edited events.

    • ✂ Remove workflow instance exception usage. Current state property is now inspected.

    • ✂ Remove menu proxy inclusions. Model proxies are now included by default.

    • ➕ Add menu proxy exclusions.

    • ⚡️ Update the subject and body fields of the document email workflow action to be optional.

    • Redirect to current user to user detail view after password change.

    • 👌 Support two different psycopg2 versions for upgrade testing.