Require posting confirmation for some particular draft name prefixes.

- Legacy-Id: 8591
This commit is contained in:
Henrik Levkowetz 2014-11-08 03:15:20 +00:00
parent b74d4e7795
commit bd6d0775e1
3 changed files with 14 additions and 1 deletions

View file

@ -200,6 +200,7 @@ INSTALLED_APPS = (
'django.contrib.humanize',
'django.contrib.messages',
'south',
'tastypie',
'ietf.person',
'ietf.name',
'ietf.group',

View file

@ -188,9 +188,21 @@ class UploadForm(forms.Form):
except Group.DoesNotExist:
raise forms.ValidationError('There is no active group with acronym \'%s\', please rename your draft' % components[2])
elif name.startswith("draft-rfc-"):
return Group.objects.get(acronym="iesg")
elif name.startswith("draft-irtf-"):
return Group.objects.get(acronym="irtf")
elif name.startswith("draft-iab-"):
return Group.objects.get(acronym="iab")
elif name.startswith("draft-iana-"):
return Group.objects.get(acronym="iana")
elif name.startswith("draft-rfc-editor-") or name.startswith("draft-rfced-") or name.startswith("draft-rfceditor-"):
return Group.objects.get(acronym="rfceditor")
else:
return None

View file

@ -158,7 +158,7 @@ def submission_status(request, submission_id, access_token=None):
except Preapproval.DoesNotExist:
preapproval = None
requires_group_approval = submission.rev == '00' and submission.group and submission.group.type_id in ("wg", "rg") and not preapproval
requires_group_approval = submission.rev == '00' and submission.group and submission.group.type_id in ("wg", "rg", "ietf", "irtf", "iab", "iana", "rfcedtyp") and not preapproval
requires_prev_authors_approval = Document.objects.filter(name=submission.name)