Commit Graph

547 Commits

Author SHA1 Message Date
Roberto Rosario
1ad68a61f5 Only create the initial document type and web source if none exists. 2015-11-19 00:45:04 -04:00
Roberto Rosario
1867c589f5 Remove admin user tests for the documents app views. SPlit all view test into priviledged and unpriviledged tests. 2015-11-04 01:43:44 -04:00
Roberto Rosario
97c3a74331 Fix incorrect ACL check method. 2015-11-04 01:43:11 -04:00
Roberto Rosario
13b167abc9 Split mode documents app view tests into test with and without permissions. 2015-11-03 23:32:09 -04:00
Roberto Rosario
3a6cf48068 Return PermissionDenied when user has no sufficient permission and accessting one document. 2015-11-03 16:31:03 -04:00
Roberto Rosario
8a50721117 Expand and improve the documents app view tests. 2015-11-03 01:37:35 -04:00
Roberto Rosario
a1a0a6da52 PEP8 Cleanups. 2015-10-28 02:14:48 -04:00
Roberto Rosario
26250412ce Add test for the document version revert and document version download links. GL issue #230. 2015-10-28 01:33:43 -04:00
Roberto Rosario
c116a46af4 PEP8 cleanusp. 2015-10-28 01:33:26 -04:00
Roberto Rosario
f517057dba Add permission inheritance to document pages and documents version with 'document' as the parent object. 2015-10-28 01:07:24 -04:00
Roberto Rosario
9bbd148497 Remove NewDocumentVersionBlockViewTestCase, it belongs in the sources app only. 2015-10-25 01:53:32 -04:00
Roberto Rosario
da4c41c5b2 Change the way new document version are blocked, moving the logic to the documents app from the checkouts app signal handler. Disable the upload new document version button and have the new version upload view redirect to the document version list with a message. GitLab issue #231. 2015-10-23 06:06:59 -04:00
Roberto Rosario
02171755f0 Update the document_multiple_clear_transformations, document_clear_transformations_view, document_multiple_update_page_count, and document_update_page_count views to use the new filter by access ACL code. Add some and improve other document views tests. 2015-10-22 21:59:35 -04:00
Roberto Rosario
54ae8bcda5 Add GenericViewTestCase and GenericDocumentViewTestCase classes. 2015-10-21 20:50:31 -04:00
Roberto Rosario
f739dd54ac Fix document download views. Fixes GL issue #229. Thanks to @ammaranjith for the find and fix idea. 2015-10-21 03:38:56 -04:00
Roberto Rosario
58f73f0b1e Use Django's six library for Py3 compatibility. 2015-10-21 03:33:10 -04:00
Roberto Rosario
6b950b7ccf Style update. 2015-10-21 03:32:51 -04:00
Roberto Rosario
5f9c847239 Move stub deletion code from tasks.py to the manager of the Document model. 2015-10-21 01:34:03 -04:00
Roberto Rosario
0cf963c19f Make user or admin login more explicit in the documents apps view tests. 2015-10-21 00:52:19 -04:00
Roberto Rosario
df7a5c6e1c Reorganize tests literals and move then to their respective apps. 2015-10-20 21:14:07 -04:00
Roberto Rosario
6c65598a4d Remove permission check from the multiple document action links, an user may not have permissions for some items but maybe does for others, we don't know as scanning the entire queryset for ACLs is costly, so we leave the links enable, permission check is done by the view. 2015-10-20 20:05:40 -04:00
Roberto Rosario
9fbc8647b8 Fix document list generation for the document's type change views. Move type change event and recent document addition to the models. Add view tests for the document's type change views. 2015-10-20 20:03:54 -04:00
Roberto Rosario
f9940f1fd0 Add default_app_config value to each app. Closes issue GL #216. 2015-10-19 02:57:00 -04:00
Roberto Rosario
19a2c02594 Document count column in document type list view is now permission aware. 2015-10-19 02:19:08 -04:00
Roberto Rosario
94bebf90ca Remove TODO reminder, error are logged by Celery. 2015-10-19 02:10:12 -04:00
Roberto Rosario
64faa0ca15 Fix documents app view tests. Update code to match code style. PEP8 fixes. 2015-10-19 01:54:37 -04:00
Roberto Rosario
e791f2d36c Get deserialized documents by UUID only. 2015-10-19 01:21:16 -04:00
Roberto Rosario
32c7b0e379 Fix import typo. 2015-10-19 00:56:24 -04:00
Roberto Rosario
6e43b99ecd Add natural key serialization. 2015-10-17 05:13:58 -04:00
Roberto Rosario
5b0359d379 Increase delay after new version in test. 2015-10-15 14:54:38 -04:00
Roberto Rosario
bdc15fb518 Show thumbnails and previews for deleted documents. 2015-10-14 15:23:02 -04:00
Roberto Rosario
976a86947e Add management command to run tests from app list built dynamically. 2015-10-10 03:24:57 -04:00
Roberto Rosario
27da0f8bb2 Add missing translation marker. Closes issue GL#201. 2015-10-08 19:29:19 -04:00
Roberto Rosario
86ff835839 PEP8 Cleanups. 2015-10-07 22:24:44 -04:00
Roberto Rosario
8bdd4ba452 Add API views to download documents and document versions. 2015-10-07 02:42:36 -04:00
Roberto Rosario
e53c624792 Remove remark. 2015-09-27 01:38:20 -04:00
Roberto Rosario
3e7cd0c1ea Move retention policies enforcement code to the DocumentType model manager. Add corresponding tests (test_auto_trashing and test_auto_delete). 2015-09-27 00:35:56 -04:00
Roberto Rosario
22a29eede3 Use explicit literals for the time delta units used for retention policies. 2015-09-26 23:52:10 -04:00
Roberto Rosario
c796f2b2c4 TODO comment cleanups. Remove unused Document model method. 2015-09-26 23:50:57 -04:00
Roberto Rosario
6159645261 Remove print statements. 2015-09-25 17:01:18 -04:00
Roberto Rosario
500f870c78 Do a force pull of all translations and a compile. 2015-09-25 04:18:04 -04:00
Roberto Rosario
8629e6495e Translation source files updates. Add translator comments. Thanks to Berny for these. 2015-09-24 16:30:19 -04:00
Roberto Rosario
c9b981f07a Update translation sources and compiles files. 2015-09-24 01:44:03 -04:00
Roberto Rosario
6ccfaf59f8 Add 1 second delay to workaround MySQL <5.6.4 not storing millisecond time data which is used to determine lastest version of a document. 2015-09-21 04:19:57 -04:00
Roberto Rosario
df417f562c PEP8 Cleanups (471 warnings). 2015-09-17 21:34:27 -04:00
Roberto Rosario
bd01fe1b72 Add 1 seconds delay to avoid version revert tests failing on MySQL. This is because MySQL doesn't store milliseconds in the DB. Version revert uses timestamp as the original document and the new version are created within the same second the revert code doesn't work. This delay is a hack and a better solution to differentiate versions by serial or similar needs to be implemented. 2015-09-17 02:57:28 -04:00
Roberto Rosario
0d591e7ff6 Reorganize methods as per design document. 2015-09-17 02:56:46 -04:00
Roberto Rosario
60e64b92fd PEP8 Cleanup (495 warnings). 2015-09-16 09:33:16 -04:00
Roberto Rosario
6ca6cd9f21 PEP8 Cleanusp (549 warnings). 2015-09-16 04:15:10 -04:00
Roberto Rosario
e1a04d9838 Convert document trash view to CBV. Improve ConfirmView based CBVs. 2015-09-15 02:02:38 -04:00