Fix to permit secretariat staff to post liaisons on behalf of liaison managers, assuming the permissions of the person they post on behalf of for this purpose.

- Legacy-Id: 3046
This commit is contained in:
Henrik Levkowetz 2011-04-13 13:02:21 +00:00
commit 5497fa4b8e

View file

@ -76,14 +76,11 @@ def get_info(request):
'poc': [i.email() for i in to_entity.get_poc()],
'needs_approval': from_entity.needs_approval(person=person),
'post_only': from_entity.post_only(person=person, user=request.user)})
if is_secretariat(request.user):
if from_entity:
if is_secretariat(request.user):
full_list = [(i.pk, i.email()) for i in from_entity.full_user_list()]
full_list.sort(lambda x,y: cmp(x[1], y[1]))
else:
full_list = []
full_list = [(person.pk, person.email())] + full_list
result.update({'full_list': full_list})
full_list = [(person.pk, person.email())] + full_list
result.update({'full_list': full_list})
json_result = simplejson.dumps(result)
return HttpResponse(json_result, mimetype='text/javascript')