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>
Remove Link class support for multiple permissions. Accept
only one permission for each link. Remove support for the
permission related field.
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
Instead of class attributes, make a generic reusable the
FormOption class and update the DetailForm to use a Meta
class for options.
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
Fix displaying the name of the subclass when the
queryset is missing.
Add support for passing a new argument to specify
if the field is required or not.
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
With the interface finalized, replace .filter_by_access() in
the generic view mixins with restrict_queryset().
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
Change the app view namespace from 'document_states' to
'workflows'.
Add missing icons.
Improve view names.
Split views into 3 modules: workflows views, runtime proxy views
and instance views.
Update views to comply with new MERCs 5 and 6.
Fix failing tests.
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
Sort methods. Update use of .filter_by_access() to
.restrict_queryset().
Change the method to so the final object
filtering. Instead of expressing the pk list and remove the
duplicated using a set, pass the queryset as a subquery to
the object filter. This moves the processing to the database
instead of holding a list of an unknown number of primary
keys in the memory.
Add keyword arguments.
Update tests to use the latest user test case mixin interface.
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
Sort arguments. Add keyword arguments. Update URL parameters
to the '_id' form. Remove use of .check_access() from views.
Sort methods.
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
Add keyword arguments. Sort imports. Move settings and test
literals to their own module.
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
Add keyword arguments. Update URLs for uniformity.
Update URL parameters to the '_id' form. Update
views to remove use of .check_access(). Fix escape
sequence warning in migration 0005.
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
Add keyword arguments. Update URL parameters to the '_id' form.
Movernize tests and update them to use the latest test case
improvements.
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
Update URL parameters to the "_id" forms. Add keyword arguments.
Remove use of is_path in the DOCUMENT_PARSING_PDFTOTEXT_PATH
setting.
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>