Don't cache the entire converter class to lower memory usage.
Instead a get_converter_class() function is now provided to
load the converter backend class.
Add model permission inheritance to transformations to
removel custom permission checking code in the views.
User keyword arguments.
Update URL parameters to the '_id' form.
Add missing edit and delete icons. Improve the create
icon using composition.
Update add to comply with MERCs 5 and 6.
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
Use the new document pre save hooks to disable the
new version upload link via external functions.
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
Add support for new pre save hooks.
Hooks are now lists of functions instead of dictionaries.
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
Add post_object_action_url property to redirect the view after
all items in the queryset have been processed.
Add the exception instance in the error message context.
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
Change "checkin" usage to "check_in".
Update URL parameters to the "_id" form.
Add support to checkout and check in multiple documents.
Optimize queries that used an ID list of documents for
filtering using values_list('pk', flat=True). These
queries now use .values('pk') as a subquery.
Add pre save hooks to block new document version uploads.
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
When there is no HTTP referer fallback to
common.settings_home_view instead of LOGIN_REDIRECT_URL.
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
Add icons for the workflow runtime proxy views.
Fix failing tests.
Convert runtime proxy links to use the new list facet menu.
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
Add keyword arguments.
Update view resolutions and URL parameters to the '_id' form.
Remove code from create and edit subclasses and user
the super class error checking.
Cache the view object instead of using .get_object()
every time.
Movernize tests.
Update views to comply with MERCs 5 and 6.
Split UserTestMixin into mixins for Groups and Users tests.
Add super delete and detail tests.
Remove redundant superuser filtering from views.
Add transactions to views that also commit events.
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
Normally the MultipleObjectMixin class view only allows
id_list from the GET request. This is updated to allow
that query from POST requests like those produced by the
view tests.
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
Update the URL nomeclature for uniformity.
Add document transformation link tests and improve
the transformation view tests.
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
SourceColums that don't specify an attibute or function
will receive the instance itself instead.
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
Remove the widget from the model.
Add keyword arguments.
Separate form widgets from html widgets. HTML widgets now go
in the html_widgets module.
Update the TagMultipleSelectionForm class to be a subclass of
FilteredSelectionForm.
Move Select2 specific JavaScript from the appearence app to the
tags app.
Update tag attachment and removal view names.
Modernize tests.
Add more tests.
Consolidate repeated test code into test mixins.
Update views to comply with MERCs 5 and 6.
Use uniform nomeclature for URLs.
Update URLs parameters to use the '_id' form.
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
Update the check_permission interface usage.
Use the model's default_manager instead of the explicit
.objects manager.
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
Rename the DeletedDocument proxy model to a TrashedDocument.
Rename the deleted_document views to trashed_document.
Rename the document and deleted_document URL parameters to
trashed_document.
Update URL parameters to the '_id' form.
Add keyword arguments.
Update use of .filter_by_access().
Enclose trashed document restore method in a transaction.
Sort arguments.
Update app for compliance with MERCs 5 and 6.
Add document page view tests.
Add favorite document view tests.
Movernize tests.
Replace use of urlencode with furl.
Update views to use ExternalObjectMixin.
Refactor the document and version download views.
Rename the DocumentDocumentTypeEditView to DocumentChangeTypeView.
Move the trashed document views to their own module.
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
Add keyword arguments.
Sort arguments.
Unify the ObjectListPermissionFilterMixin and
ObjectPermissionCheckMixin into the RestrictedQuerysetMixin.
Add MultipleObjectDownloadView.
Update SingleObjectDownloadView to do queryset filtering.
The method that returns the base queryset for views is
now named get_source_queryset().
The views now use .get_object_list as a multi object
homologous of get_object. The queryset returned by
.get_object_list is restricted by access.
Make MultipleObjectMixin a subclass of Django's
SingleObjectMixin to reduce repeated code.
All generic views are now imported from common.generics and not
from common.views.
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
With the removal of the support for a related field in
.restrict_queryset() the deprecation comment can now be
removed.
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
Add keyword arguments.
Remove source column functions and move their code to the model.
Use the FilteredSelectionForm for the key selection in the
document version signing view.
Update the field definition of the DetailForm subclasses
to use the new internface.
Update URL parameters to use the "_id" form.
Update views filtering to comply with MERC 6.
Move repeated test code to its own test mixin.
Update links to work with the new Link class interface.
Modernize tests.
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
Update the SingleObject Delete, Detail and Download views
to force use of a get_object_list method instead of allowing
subclasses to override the get_queryset method and bypass
the object permission checks.
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
Add a new mixin to monkey patch the Model class to
force each newly created model instance to use a randomly
generated primary key.
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
Remove support for passing a related field argument when
checking for access for restricting a queryset.
Remove a duplicate permission check.
Fix bug when filtering the direct ACL for an object,
the ACL query was filtering by the ACL ID instead of the
object ID.
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>