grant IETF Trust Chair permissions for Announcement Tool. commit ready for merge.

- Legacy-Id: 8045
This commit is contained in:
Ryan Cross 2014-07-03 19:35:38 +00:00
parent a16dc35f03
commit d6422c0c93
2 changed files with 7 additions and 5 deletions

View file

@ -28,7 +28,7 @@ FROM_LIST = ('IETF Secretariat <ietf-secretariat@ietf.org>',
'IETF Administrative Director <iad@ietf.org>',
'IETF Executive Director <exec-director@ietf.org>',
'The IAOC <bob.hinden@gmail.com>',
'The IETF Trust <tme@multicasttech.com>',
'The IETF Trust <ietf-trust@ietf.org>',
'RSOC Chair <rsoc-chair@iab.org>',
'ISOC Board of Trustees <eburger@standardstrack.com>',
'RFC Series Editor <rse@rfc-editor.org>',
@ -114,6 +114,10 @@ def get_from_choices(user):
group__acronym='isoc',
name="ceo"):
f = (FROM_LIST[18],)
elif Role.objects.filter(person=person,
group__acronym='ietf-trust',
name="chair"):
f = (FROM_LIST[12],)
# NomCom
nomcoms = Role.objects.filter(name="chair",

View file

@ -15,12 +15,10 @@ from ietf.utils.mail import send_mail_text
def check_access(user):
'''
This function takes a Django User object and returns true if the user has access to
the Announcement app. Accepted roles are:
Secretariat, IAD, IAB Chair, IETF Chair, RSOC Chair, IAOC Chair, NomCom Chair,
RSE Chair, ISOC CEO
the Announcement app.
'''
person = user.person
groups_with_access = ("iab", "rsoc", "ietf", "iaoc", "rse", "mentor")
groups_with_access = ("iab", "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"]):