grant ISOC CEO access to announcement tool, change announcement tool from option 'IAB Executive Director' to 'IAB Executive Administrative Manager'

- Legacy-Id: 7568
This commit is contained in:
Ryan Cross 2014-04-03 17:46:27 +00:00
parent 0b5fc98290
commit 2cf5f1ce25
2 changed files with 15 additions and 5 deletions

View file

@ -34,8 +34,9 @@ FROM_LIST = ('IETF Secretariat <ietf-secretariat@ietf.org>',
'RSOC Chair <rsoc-chair@iab.org>',
'ISOC Board of Trustees <eburger@standardstrack.com>',
'RFC Series Editor <rse@rfc-editor.org>',
'IAB Executive Director <execd@iab.org>',
'IETF Mentoring Program <mentoring@ietf.org>')
'IAB Executive Administrative Manager <execd@iab.org>',
'IETF Mentoring Program <mentoring@ietf.org>',
'ISOC CEO <ceo@isoc.org>')
TO_LIST = ('IETF Announcement List <ietf-announce@ietf.org>',
'I-D Announcement List <i-d-announce@ietf.org>',
@ -111,6 +112,10 @@ def get_from_choices(user):
group__acronym='mentor',
name="chair"):
f = (FROM_LIST[17],)
elif Role.objects.filter(person=person,
group__acronym='isoc',
name="ceo"):
f = (FROM_LIST[18],)
# NomCom
nomcoms = Role.objects.filter(name="chair",

View file

@ -17,9 +17,10 @@ from forms import *
# -------------------------------------------------
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
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
'''
person = user.person
groups_with_access = ("iab", "rsoc", "ietf", "iaoc", "rse", "mentor")
@ -37,6 +38,10 @@ def check_access(user):
group__acronym='iab',
name='execdir'):
return True
if Role.objects.filter(person=person,
group__acronym='isoc',
name='ceo'):
return True
return False