Commit graph

177 commits

Author SHA1 Message Date
Henrik Levkowetz 186e2ae67b Decorated post_submission() with @transaction.atomic, and did some slight refactoring of code related to post_submission() calls and submission events. This was triggered by a submission left in an intermediate state because of a WSGI timeout (leading to a 504 error).
- Legacy-Id: 17892
2020-05-28 15:01:33 +00:00
Henrik Levkowetz 3439f3d42c Tweaked a log.assertion() case.
- Legacy-Id: 17793
2020-05-14 15:47:41 +00:00
Henrik Levkowetz 111d27486f Added a pyflakes:ignore
- Legacy-Id: 17771
2020-05-10 14:25:27 +00:00
Henrik Levkowetz 0daddb5b91 Changed a log.assertion() to provide more information about the unexpected situation.
- Legacy-Id: 17770
2020-05-10 14:17:23 +00:00
Henrik Levkowetz f10ddadc0e Merged in changes from trunk up to r17584.
- Legacy-Id: 17593
2020-04-07 16:02:52 +00:00
Henrik Levkowetz 4d345573ae Check if any files matching the submitted draft name and revision already exists on disk in the active drafts or archived drafts directories, and if so reject the submission. Fixes issue #2908
- Legacy-Id: 17498
2020-03-21 22:56:57 +00:00
Henrik Levkowetz 726fcbf27d Removed all __future__ imports.
- Legacy-Id: 17391
2020-03-05 23:53:42 +00:00
Henrik Levkowetz e9a37d8ac8 Removed six.text_type(), changed six.moves.urllib to plain urllib, and removed now unused six imports.
- Legacy-Id: 17385
2020-03-05 14:41:41 +00:00
Henrik Levkowetz 060539cf1f Added a suggestion to the error message issued for invalid characters in document names found in draft submission XML files, when the invalid character is a period. In this particular case, the problem most likely is inclusion of the filename extension in the document name. Fixes issue #2874.
- Legacy-Id: 17250
2020-01-18 15:06:17 +00:00
Henrik Levkowetz 994e0ba6cc Moved the code that generates .txt and .html draft files from .xml to a place where potential errors can be caught and displayed better. Related to ticket #2814.
- Legacy-Id: 16862
2019-10-15 14:33:35 +00:00
Henrik Levkowetz 5b3b9c2791 Reverting the previous commit
- Legacy-Id: 16857
2019-10-10 18:32:49 +00:00
Henrik Levkowetz c58f370104 Updated requirements3.txt. Explicitly listing mypy version requirements is counter-productive as it is determined by django-stubs.
- Legacy-Id: 16856
2019-10-10 18:31:25 +00:00
Henrik Levkowetz 07375b46f8 Added log.unreachable() for the code that creates unknown-email-*' addresses. Addresses issue #2696.
- Legacy-Id: 16814
2019-10-02 17:45:44 +00:00
Henrik Levkowetz 33e8733b91 Fixed up mypy issues or added type:ignore comments as needed for a clean mypy run.
- Legacy-Id: 16772
2019-09-30 15:42:18 +00:00
Henrik Levkowetz e0479d8d13 Changed the call signature of docevent_from_submission() to take an optional Person object, rather than person name. Added a type hint for the signature.
- Legacy-Id: 16764
2019-09-29 20:00:49 +00:00
Henrik Levkowetz 3939c0b88c Changed draft submission to not require an email round-trip when the submitter is logged in. Added corresponding test cases.
- Legacy-Id: 16749
2019-09-26 14:43:26 +00:00
Henrik Levkowetz 78889979a1 Changed the draft submission form and views so that an email address is required for each author in order to complete self-service draft submission. It is possible to add these as metadata updates, but this will lead to submission through the secretariat (and the email addresses will still be required). Also updated related templates to make the handling of form section headings more consistent.
- Legacy-Id: 16745
2019-09-23 17:26:16 +00:00
Henrik Levkowetz a3f59ee9a2 Added conversion of version 3 XML draft submissions to v3 HTML, in addition to text. Added a link to HTML versions (when present) to the document status page, and renamed the link to the htmlized version to 'htmlized'. Converted the submission XML test-file to version 3. Added test code to check that HTML is generated for version 3 XML submissions.
- Legacy-Id: 16737
2019-09-20 14:24:44 +00:00
Henrik Levkowetz 44f42cdb3a Undid the previous commit
- Legacy-Id: 16735
2019-09-20 11:30:04 +00:00
Henrik Levkowetz e3e9f676b7 Added class 'bg-danger' to submission error messages. The big 'Meta-Data errors found' pane on red background is so noticeable that class 'text-danger' which gives bold text is insufficient to stand out clearly. Adding 'bg-danger' gives the specific error messages red background, too.
- Legacy-Id: 16734
2019-09-20 11:28:53 +00:00
Henrik Levkowetz e03784132d Merged changes from current trunk to Py3 branch.
- Legacy-Id: 16468
2019-07-16 15:36:16 +00:00
Henrik Levkowetz 8c6eb3a30a Python2/3 compatibility: Changed the use of open() and StringIO to io.open() etc.
- Legacy-Id: 16458
2019-07-15 19:14:04 +00:00
Henrik Levkowetz f481f5c3e6 Replaced use of six with the equivalent pure python3 constructs.
- Legacy-Id: 16428
2019-07-08 10:43:47 +00:00
Henrik Levkowetz 1225f8af6b Refactored submission code to be clearer and only do mimetype extraction in one place, made the point where files are saved less obscure, fixed bytes/str issues for file read and write, fixed regex strings, fixed variable name visibility due to scope changes in py3.
- Legacy-Id: 16375
2019-07-04 15:49:42 +00:00
Henrik Levkowetz b54e033474 Fixed an error in the handling of long draft names extracted from xml source.
- Legacy-Id: 16363
2019-07-03 19:56:04 +00:00
Henrik Levkowetz d7f5c84182 Initial 2to3 patch with added copyright statement updates.
- Legacy-Id: 16309
2019-06-27 14:40:54 +00:00
Henrik Levkowetz 13705976e2 Merged in [16287] from rjsparks@nostrum.com:
Send mail to a list when a new IETF WG -00 is submitted. Fixes #2730.
 - Legacy-Id: 16289
Note: SVN reference [16287] has been migrated to Git commit 9ace7db719
2019-06-19 14:32:25 +00:00
Robert Sparks 9ace7db719 Send mail to a list when a new IETF WG -00 is submitted. Fixes #2730. Commit ready for merge.
- Legacy-Id: 16287
2019-06-18 21:24:49 +00:00
Henrik Levkowetz a5cf8b6a3b Added a better error message for too long draft names during submission.
- Legacy-Id: 16281
2019-06-17 18:25:05 +00:00
Henrik Levkowetz 426870b766 Merged in the Document and DocAlias primary key change and m2m work in ^/personal/henrik/6.96.1-docalias.
- Legacy-Id: 16261
2019-06-15 12:00:48 +00:00
Henrik Levkowetz a2cafded25 Changed DocAlias to be many-to-many, in order to be able to handle STD aliases referring to multiple RFCs.
- Legacy-Id: 16249
2019-06-14 20:38:14 +00:00
Henrik Levkowetz d300a82845 Added validation of draft names extracted from XML submission files.
- Legacy-Id: 16239
2019-06-12 22:06:53 +00:00
Henrik Levkowetz 94de3e0f7e Refined the handling of draft xml version 3 versus version 2.
- Legacy-Id: 16229
2019-06-03 14:51:34 +00:00
Henrik Levkowetz b57ad67041 Updated code and templates to use the new docman and groupman group features.
- Legacy-Id: 15922
2019-01-30 15:59:00 +00:00
Henrik Levkowetz 57a4c9f41f Added 9 new group features, and changed list-like char fields to json fields, to get better support for using the values as lists. Modified code to use the group features instead of explicit lists of group types in many places in the code.
- Legacy-Id: 15908
2019-01-22 18:11:46 +00:00
Henrik Levkowetz 879f44a2ab Merged in [15829] from rjsparks@nostrum.com:
Make state/substate changes on new submissions sensitive to stream. Fixes #2642.
 - Legacy-Id: 15872
Note: SVN reference [15829] has been migrated to Git commit 3d6c1f991b
2019-01-07 15:51:07 +00:00
Robert Sparks 3d6c1f991b Make state/substate changes on new submissions sensitive to stream. Fixes #2642. Commit ready for merge.
- Legacy-Id: 15829
2018-12-17 22:38:22 +00:00
Robert Sparks 6118975620 Added an explicit ID-Exists state for the IESG state machine. Reworked code so that the IESG state machine always has a state. Added the ability to release a document from a working group, research group, or the independent stream. Releasing a document removes all stream state, and sets the document to have no stream.
- Legacy-Id: 15809
2018-12-11 22:38:05 +00:00
Henrik Levkowetz b2bfc7858a Generalized the log.assertion() function a bit to be able to provide more information on assertion failure.
- Legacy-Id: 15426
2018-08-10 15:31:12 +00:00
Henrik Levkowetz b1440e818b Added assingment of the person.name_from_draft field on draft submission. To be used to replace the content of person.name if someone requires removal of consent-based name info.
- Legacy-Id: 15178
2018-05-26 08:40:58 +00:00
Henrik Levkowetz 6c3ec5b18e Added Email origin to Email record creation throughout the codebase.
- Legacy-Id: 15149
2018-05-17 16:56:26 +00:00
Henrik Levkowetz dda9c0136c Overwrite earlier email origin when we've picked up the address from a submission.
- Legacy-Id: 15141
2018-05-08 16:23:27 +00:00
Henrik Levkowetz 5f37a71889 Added origin information to all places where we create email address entries.
- Legacy-Id: 15127
2018-05-05 12:40:30 +00:00
Henrik Levkowetz 5573dc00d0 Find person by email during draft submission also if email case doesn't match.
- Legacy-Id: 14723
2018-03-02 21:27:13 +00:00
Henrik Levkowetz 26bf387356 Replaced direct assignment to m2m fields with .clear() and .set()
- Legacy-Id: 14666
2018-02-21 23:58:25 +00:00
Henrik Levkowetz 4695ec5383 Restricted automatic IANA state change into 'Version Changed - Review Needed' on new draft revisions to events before document approval, based on conversation with Michelle.
- Legacy-Id: 14486
2018-01-04 12:31:05 +00:00
Henrik Levkowetz 130261e781 Removed some debug statements.
- Legacy-Id: 14242
2017-10-30 12:28:51 +00:00
Henrik Levkowetz 7edb4da711 Added draft URLs pointing to Yang resources (impact analysis and model metadata) for submissions containing Yang modules.
- Legacy-Id: 14237
2017-10-30 11:30:01 +00:00
Henrik Levkowetz ac69d9889d Added a guard against feeding int() a non-numeric string during submission confirmation and a log assertion to report same.
- Legacy-Id: 14202
2017-10-10 15:02:00 +00:00
Henrik Levkowetz 2c1438c240 Moved unidecode_name from utils.text to person.name.
Modified UserFactory to use a new locale for each new user, instead of the
same locale for a whole test run.  This (almost) ensures the exercise of
code to deal with non-ascii names, something which would not happen if a
locale with ascii names was chosen at the start of a run.

Modified name.initials() to not use non-word characters as initials.

Modified unidecode_name() to do more normalization, to conform to the
conventions used in internet-drafts.

Added saving of the factory-boy random state in order to be able to re-run
a test suite with the same pseudo-random sequence as in a previous failed
run.

Fixed an issue with email formatting in test_api_submit_ok().

Modified the draft author extraction code to deal better with names with
embedded apostrophes.
 - Legacy-Id: 14141
2017-09-20 15:36:30 +00:00