handle user hashes when mailing evolution details (#1687)

This commit is contained in:
Frédéric Péters 2012-09-21 17:18:18 +02:00 committed by Thomas NOEL
parent 5644dbce0e
commit 5967adc192
1 changed files with 9 additions and 3 deletions

View File

@ -520,12 +520,18 @@ class FormDef(StorableObject):
details = []
evo = formdata.evolution[-1]
if evo.who:
evo_who = None
if evo.who == '_submitter':
evo_who = formdata.user_id
if formdata.user_id:
evo_who = formdata.user_id
elif formdata.user_hash:
if formdata.is_submitter(get_request().user):
evo_who = get_request().user.id
else:
evo_who = evo.who
details.append(_('User name'))
details.append(' %s' % get_publisher().user_class.get(evo_who).name)
if evo_who:
details.append(_('User name'))
details.append(' %s' % get_publisher().user_class.get(evo_who).name)
if evo.status:
details.append(_('Status'))
details.append(' %s' % formdata.get_status_label())