From 99331e920d4faf3995880faf30d256ace57840c4 Mon Sep 17 00:00:00 2001 From: Byron Jones Date: Fri, 14 Aug 2015 12:30:45 +0800 Subject: Bug 1194584 - "has cert" and "member of secure group" shouldn't be visible when creating a user --- .../hook/admin/users/userdata-end.html.tmpl | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) (limited to 'extensions/SecureMail/template/en/default/hook') diff --git a/extensions/SecureMail/template/en/default/hook/admin/users/userdata-end.html.tmpl b/extensions/SecureMail/template/en/default/hook/admin/users/userdata-end.html.tmpl index 37b3277c9..e5f1c8277 100644 --- a/extensions/SecureMail/template/en/default/hook/admin/users/userdata-end.html.tmpl +++ b/extensions/SecureMail/template/en/default/hook/admin/users/userdata-end.html.tmpl @@ -6,24 +6,28 @@ # defined by the Mozilla Public License, v. 2.0. #%] +[% RETURN UNLESS otheruser.id %] + Has Secure Mail Key/Cert: - [% IF user.public_key %]Yes[% ELSE %]No[% END %] + [% otheruser.public_key ? "Yes" : "No" %] Member of Secure Mail Group: - [% securemail_member = 0 %] - [% FOREACH group = user.groups %] - [% IF group.secure_mail %] - [% securemail_member = 1 %] - [% LAST %] - [% END %] - [% END %] - [% IF securemail_member %]Yes[% ELSE %]No[% END %] + [% + securemail_member = 0; + FOREACH group IN otheruser.groups; + IF group.securemail; + securemail_member = 1; + LAST; + END; + END; + securemail_member ? "Yes" : "No"; + %] -- cgit v1.2.3-24-g4f1b