- Add back support for API views but using the
api_urlpatterns list. Needed for the current user
API until a dynamic route router is implemented that
can allow a viewset action to specify its entire URL.
- Make sure the user is authenticated before
trying to the user permissions.
- Improve how external_object_list options are read from
the class.
- None authenticated users will get a blank queryset if the
view doesn't require a permission.
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
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>
Extract test views and user code into their own separate test case
mixins. Append TestCase to test case mixins with base test code
to differentiate them from test mixins with reusable view calls.
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
Instead of inserting the path of the apps into the Python app,
the apps are now referenced by their full import path.
This app name claves with external or native Python libraries.
Example: Mayan statistics app vs. Python new statistics library.
Every app reference is now prepended with 'mayan.apps'.
Existing config.yml files need to be updated manually.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>