Remove the APIRoot view.
Remove the Endpoint class.
Remove the EndpointSerializer.
Move API documentation generation from the root urls module
to the app's urls module.
Update the app API URL generation to be based on viewsets
instead of an custom api_urls list.
Remove MayanObjectPermissionsFilter and replace it with
MayanViewSetObjectPermissionsFilter which allows mapping
a required permission to a specific viewset action.
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
Sort arguments.
Fix failing tests.
Sort view classes.
Replace get_object() with self.object in the delete and
edit views.
Use ExternalObjectMixin to simplify views.
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
Instead of calculating these values in the dispatch
method, add new methods to calculate and insert the values of
next_url and previous_url in the context.
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
Add support to sort a model column by a field
other than the one being displayed.
Fix the missing column issue in the list subtemplate.
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
Convert half the widget to HTML widgets.
Rename links and views to use the nomeclature _template_
and _instance_ to differenciate between index instances
and index templates.
Update URL parameters to use the "_id" form.
Add more tests.
Add model permission inheritance to the IndexTemplateNode,
and IndexInstanceNode models.
Remove the level and document count display from the
instance node. Display instead the total items.
Use a FilteredSelectionForm subclass to display the list
of index templates to rebuild.
Add missing icons.
Add keyword arguments to links.
Modernize tests to use the document test mixin.
Update the permission requirements for the index template
document type selection screen. The document type view
permission is now required in addition to the index
template edit permission.
Use ExternalObjectMixin to reduce the code in all views.
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
Only override success_url if self.get_post_object_action_url()
provides an alternative.
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
Update permission variable name from
"permission_document_metadata_" to "permission_metadata_".
Fix failing tests.
Add test for same metadata type mixin.
Split metadata add and remove test into test for GET and
POST requests.
Remove use of urlencode and instead use furl.
Simplify view using self.action_count and
self.action_id_list.
Use ExternalObjectMixin to remove repeated code.
Move the repeated code to test for all documents to
be of the same type into its own mixin.
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
Add translatable label to the label admin method.
Add access association from DocumentVersionDriverEntry to
document version.
Enclose process method and event commit in a transaction.
Update process method to not error out if EXIF tool
is not found.
Update views and tests to use ExternalObjectMixin and
comply with MERCs 5 and 6.
Signed-off-by: Roberto Rosario <Roberto.Rosario.Gonzalez@gmail.com>
Update the ACL delete icon for uniformity.
Insert both the ACL and object in the view to also
display the ACL permissions and delete view when
viewing the ACL of an object.
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
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>