Michael Price
e1956f8d80
Get rids of the APIEndPoint and APIResource classes. Register API url using the 'has_rest_api' AppConfig variable.
...
Signed-off-by: Michael Price <loneviking72@gmail.com >
2018-04-01 18:30:59 -04:00
Michael Price
36d19ea284
Add API test for the checkout list view.
...
Signed-off-by: Michael Price <loneviking72@gmail.com >
2018-04-01 18:30:39 -04:00
Michael Price
744976e8a1
Fix flake8 warnings.
...
Signed-off-by: Michael Price <loneviking72@gmail.com >
2018-04-01 18:30:27 -04:00
Michael Price
d8d6dada5e
Add document parsing app API tests.
...
Signed-off-by: Michael Price <loneviking72@gmail.com >
2018-04-01 18:30:14 -04:00
Michael Price
3c4f9ced11
Add checkouts app API tests.
...
Signed-off-by: Michael Price <loneviking72@gmail.com >
2018-04-01 18:29:49 -04:00
Michael Price
938093db6f
Make sure to require the checkedout detail view permission for the checked out document detail API view.
...
Signed-off-by: Michael Price <loneviking72@gmail.com >
2018-04-01 18:29:35 -04:00
Michael Price
b4bf9bfaee
Switch to a resource and service based API from previous app based one.
...
Signed-off-by: Michael Price <loneviking72@gmail.com >
2018-04-01 18:28:40 -04:00
Michael Price
3919e6404c
Improve and add workflow app tests.
...
Signed-off-by: Michael Price <loneviking72@gmail.com >
2018-04-01 18:28:07 -04:00
Michael Price
775894ee0d
Improve permission having in the workflow app views. Most were made more granular and operate now on an object access basis instead of working per view permission.
...
Signed-off-by: Michael Price <loneviking72@gmail.com >
2018-04-01 18:27:23 -04:00
Michael Price
a4a3c96228
Update workflow links according to the view name updates.
...
Signed-off-by: Michael Price <loneviking72@gmail.com >
2018-04-01 18:26:55 -04:00
Michael Price
471458fda3
Update workflow views' URL and names for consistency with Mayan's best practices.
...
Signed-off-by: Michael Price <loneviking72@gmail.com >
2018-04-01 18:26:42 -04:00
Michael Price
b8e97164c8
Remove unused line.
...
Signed-off-by: Michael Price <loneviking72@gmail.com >
2018-04-01 18:26:13 -04:00
Michael Price
974fa8e210
Fix super class name.
...
Signed-off-by: Michael Price <loneviking72@gmail.com >
2018-04-01 18:26:02 -04:00
Michael Price
984e8a5b2c
Silence deprecation warning about default manager for child models. Reorganize model according to Mayan's best practices.
...
Signed-off-by: Michael Price <loneviking72@gmail.com >
2018-04-01 18:25:32 -04:00
Michael Price
fd9a7217e9
Reduce repeated code in test.
...
Signed-off-by: Michael Price <loneviking72@gmail.com >
2018-04-01 18:25:18 -04:00
Michael Price
b1080e5fe5
Convert the TextAreaDiv widget to use template-based rendering as per Django's release notes: https://docs.djangoproject.com/en/2.0/releases/1.11/#template-based-widget-rendering
...
Signed-off-by: Michael Price <loneviking72@gmail.com >
2018-04-01 18:25:03 -04:00
Michael Price
2b77da369d
render_subtemplate's Context contructor needs a dictionary as the argument as per Django's release notes: https://docs.djangoproject.com/en/2.0/releases/1.11/#django-template-backends-django-template-render-prohibits-non-dict-context
...
Signed-off-by: Michael Price <loneviking72@gmail.com >
2018-04-01 18:24:43 -04:00
Michael Price
9043291b8d
Don't put the raw document queryset in the template context. It is not needed anymore.
...
Signed-off-by: Michael Price <loneviking72@gmail.com >
2018-04-01 18:23:00 -04:00
Michael Price
4af9dfa36d
Don't use document_list which is not paginated. Use object_list instead which is paginated.
...
Signed-off-by: Michael Price <loneviking72@gmail.com >
2018-04-01 18:22:39 -04:00
Michael Price
72160bf806
Make CabinetDetailView a subclass of DocumentListView to add pagination to the document list.
...
Signed-off-by: Michael Price <loneviking72@gmail.com >
2018-04-01 18:22:22 -04:00
Michael Price
bc85c3be59
Add inherited permission check for the DocumentPageSearch model.
...
This and not the DocumentPage is the actual model return for page searches.
Signed-off-by: Michael Price <loneviking72@gmail.com >
2018-04-01 18:21:54 -04:00
Michael Price
e3d400c70d
Add common.utils.return_related function to support double underscore related model references.
...
Signed-off-by: Michael Price <loneviking72@gmail.com >
2018-04-01 18:21:26 -04:00
Roberto Rosario
0edb028bbf
Finish updating DocumentAPITestCase tests to test for access.
...
Start updateing DeletedDocumentAPITestCase tests to test the access.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com >
2018-04-01 18:19:11 -04:00
Roberto Rosario
cc7f69b908
Continue updating the document app API tests to work with access and permission
...
level testing.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com >
2018-04-01 18:16:03 -04:00
Roberto Rosario
1d5a60ef9e
Update DocumentTypeAPITestCase to with test with/without access.
...
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com >
2018-04-01 18:10:02 -04:00
Roberto Rosario
1ed9f9819a
Fix document state migration dependency.
...
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com >
2018-04-01 02:43:41 -04:00
Michael Price
7db6bd3fc4
Use already available .get_for_class class method and avoid code repetition.
...
Signed-off-by: Michael Price <loneviking72@gmail.com >
2018-04-01 02:41:33 -04:00
Michael Price
98f31ff491
Use the get_or_create method instead of a blind create to avoid duplicated notifications for the same event when the user is subscribed to the object's event and to the global event.
...
Signed-off-by: Michael Price <loneviking72@gmail.com >
2018-04-01 02:35:39 -04:00
Michael Price
d201f2c31c
Show horizontal on the list item template only when there are items present.
...
Signed-off-by: Michael Price <loneviking72@gmail.com >
2018-04-01 02:35:12 -04:00
Michael Price
b45be228d2
Update the remaining document app API tests to test with and without permissions.
...
Update the remaining API tests to conform to the updated API test class interface.
Signed-off-by: Michael Price <loneviking72@gmail.com >
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com >
2018-04-01 02:30:37 -04:00
Eric Riggs
c85035b58e
- Improve the styling of the multiple object action form by controlling the top and bottom margins.
...
- Equalize styling of the multiple object action form in the list items and item subtemplates.
Signed-off-by: Eric Riggs <ericriggs42@gmail.com >
2018-04-01 02:00:27 -04:00
Eric Riggs
eceb3ed877
- Make the multi object form perform an auto submit when the value is changed.
...
- Add multiple object select checkbox that was missing in the list item subtemplate.
Signed-off-by: Eric Riggs <ericriggs42@gmail.com >
2018-04-01 01:57:47 -04:00
Michael Price
ec51aecad6
Remove the .gitignore file from 3rd party Javascript libraries.
...
Signed-off-by: Michael Price <loneviking72@gmail.com >
2018-04-01 01:56:09 -04:00
Michael Price
d64f72351d
Customize the empty formset message for the document type metadata type relationship view.
...
Signed-off-by: Michael Price <loneviking72@gmail.com >
2018-04-01 01:52:42 -04:00
Michael Price
34fc5a5bcf
Don't error out when there are no metadata types available.
...
Signed-off-by: Michael Price <loneviking72@gmail.com >
2018-04-01 01:52:11 -04:00
Roberto Rosario
93cba698e4
Instead of throwing an error, display an empty form is there are not event types to display.
...
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com >
2018-04-01 01:51:25 -04:00
Michael Price
93dbf789d0
Add support for displaying a message when a formset is empty.
...
Signed-off-by: Michael Price <loneviking72@gmail.com >
2018-04-01 01:45:50 -04:00
Michael Price
d59466123b
Fix the test_document_attach_tag_view_with_tag_access test assertion.
...
Signed-off-by: Michael Price <loneviking72@gmail.com >
2018-04-01 01:41:06 -04:00
Michael Price
1d0ef774e6
Update the remaining document app API tests to test with and without permissions. Update the remaining API tests to conform to the updated API test class interface.
...
Signed-off-by: Michael Price <loneviking72@gmail.com >
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com >
2018-04-01 01:38:11 -04:00
Michael Price
68c572bd6e
Require the document view permission to view the details of a trashed document.
...
Add a get method override to document the API endpoint.
Signed-off-by: Michael Price <loneviking72@gmail.com >
2018-04-01 01:33:27 -04:00
Michael Price
54e8f85def
Update the linking app API tests to test endpoints with and without permissions or accesses.
...
Update API tests to conform to the updated API test class interface.
Signed-off-by: Michael Price <loneviking72@gmail.com >
2018-04-01 01:31:19 -04:00
Michael Price
80d7410c15
Update the workflow app API tests to test with and without permissions. Update the API test to conform to the latest API test class interface.
...
Signed-off-by: Michael Price <loneviking72@gmail.com >
2018-04-01 01:30:51 -04:00
Michael Price
837d64dfdb
Register the workflow_view permission to the Document model.
...
Add task to rebalance the workflow app permission checking.
Signed-off-by: Michael Price <loneviking72@gmail.com >
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com >
2018-04-01 01:30:21 -04:00
Michael Price
db735bc454
- Require the permission_workflow_view for the workflow to be able to view a document type's workflow list.
...
- Fix the permission check to create workflows. Previously it has not effect as it has using the
mayan_object_permissions instead of the mayan_view_permissions dictionary.
- Require the permission_workflow_view to view the workflow instance list.
- Require the permission_workflow_view to view a workflow instance's details.
Signed-off-by: Michael Price <loneviking72@gmail.com >
2018-04-01 01:28:38 -04:00
Michael Price
2f4abb22f8
Update the metadata app API tests to test with and without the correspoding permissions and accesses. Update the test to the latest API test class interface.
2018-04-01 01:28:04 -04:00
Michael Price
679cf70269
Associate the permissions: metadata_type_delete/edit/view with the MetadataType model.
...
Signed-off-by: Michael Price <loneviking72@gmail.com >
2018-04-01 01:27:11 -04:00
Michael Price
3b5c5666b3
Don't register the user create and group create permissions with a their respective models.
...
These permissions can only be granted globally.
Signed-off-by: Michael Price <loneviking72@gmail.com >
2018-04-01 01:26:54 -04:00
Michael Price
bfa7950d6a
Update the MOTD app API tests to test with and without permissions. Update the API tests to conform with the API test class interface.
...
Signed-off-by: Michael Price <loneviking72@gmail.com >
2018-04-01 01:26:24 -04:00
Michael Price
89b9492f39
Register the corresponding Message model permissions.
...
Signed-off-by: Michael Price <loneviking72@gmail.com >
2018-04-01 01:25:57 -04:00
Michael Price
8bf3822e54
Update the user OCR API tests to test for fail and success scenarios
...
based on access. The tests were also updated to comform
with the new API test class interface.
Signed-off-by: Michael Price <loneviking72@gmail.com >
2018-04-01 01:25:38 -04:00