Grant Bob Hinden announcement tool access. Commit ready for merge

- Legacy-Id: 11037
This commit is contained in:
Ryan Cross 2016-03-30 17:40:13 +00:00
parent 9f90441aa6
commit 5c06843f2c
2 changed files with 8 additions and 3 deletions
ietf/secr/announcement

View file

@ -30,7 +30,7 @@ FROM_LIST = ('IETF Secretariat <ietf-secretariat@ietf.org>',
'The IAOC <tobias.gondrom@gondrom.org>',
'The IETF Trust <ietf-trust@ietf.org>',
'RSOC Chair <rsoc-chair@iab.org>',
'ISOC Board of Trustees <eburger@standardstrack.com>',
'ISOC Board of Trustees <bob.hinden@gmail.com>',
'RFC Series Editor <rse@rfc-editor.org>',
'IAB Executive Administrative Manager <execd@iab.org>',
'IETF Mentoring Program <mentoring@ietf.org>',
@ -54,6 +54,7 @@ def get_from_choices(user):
leadership chairs and other entities.
'''
person = user.person
f = []
if has_role(user,'Secretariat'):
f = FROM_LIST
elif has_role(user,'IETF Chair'):
@ -87,6 +88,10 @@ def get_from_choices(user):
group__acronym='isoc',
name="ceo"):
f = (FROM_LIST[18],)
elif Role.objects.filter(person=person,
group__acronym='isocbot',
name="chair"):
f = (FROM_LIST[14],)
elif Role.objects.filter(person=person,
group__acronym='ietf-trust',
name="chair"):

View file

@ -19,7 +19,7 @@ def check_access(user):
the Announcement app.
'''
person = user.person
groups_with_access = ("iab", "rsoc", "ietf", "iaoc", "rse", "mentor","ietf-trust")
groups_with_access = ("iab", "isoc", "isocbot", "rsoc", "ietf", "iaoc", "rse", "mentor","ietf-trust")
if Role.objects.filter(person=person,
group__acronym__in=groups_with_access,
name="chair") or has_role(user, ["Secretariat","IAD"]):
@ -54,7 +54,7 @@ def main(request):
and send.
'''
if not check_access(request.user):
return HttpResponseForbidden('Restricted to: Secretariat, IAD, or chair of IETF, IAB, RSOC, RSE, IAOC, NomCom.')
return HttpResponseForbidden('Restricted to: Secretariat, IAD, or chair of IETF, IAB, RSOC, RSE, IAOC, ISOC, NomCom.')
form = AnnounceForm(request.POST or None,user=request.user)