From 3891b63a1eb52076337885487f251a10580a4a85 Mon Sep 17 00:00:00 2001 From: Frédéric Buclin Date: Wed, 27 Apr 2016 18:50:13 +0200 Subject: Bug 218917 - Allow the login name to be different from the email address Original patch by Gervase Markham r=gerv a=dkl --- template/en/default/admin/flag-type/edit.html.tmpl | 6 +-- .../default/admin/groups/confirm-remove.html.tmpl | 6 +-- template/en/default/admin/groups/edit.html.tmpl | 2 +- template/en/default/admin/params/auth.html.tmpl | 22 +++----- template/en/default/admin/params/ldap.html.tmpl | 5 +- .../default/admin/users/confirm-delete.html.tmpl | 10 +++- template/en/default/admin/users/list.html.tmpl | 61 +++++++++++++--------- template/en/default/admin/users/search.html.tmpl | 1 + template/en/default/admin/users/userdata.html.tmpl | 28 ++++++++-- 9 files changed, 81 insertions(+), 60 deletions(-) (limited to 'template/en/default/admin') diff --git a/template/en/default/admin/flag-type/edit.html.tmpl b/template/en/default/admin/flag-type/edit.html.tmpl index 7505ebd8c..1fccea4a5 100644 --- a/template/en/default/admin/flag-type/edit.html.tmpl +++ b/template/en/default/admin/flag-type/edit.html.tmpl @@ -161,11 +161,7 @@ if requestable, who should get carbon copied on email notification of requests. This is a comma-separated list of full e-mail addresses which do not need to be [% terms.Bugzilla %] logins. - [% IF Param('emailsuffix') %] - Note that the configured emailsuffix - [% Param('emailsuffix') %] will not be appended - to these addresses, so you should add it explicitly if so desired. - [% END %]
+
diff --git a/template/en/default/admin/groups/confirm-remove.html.tmpl b/template/en/default/admin/groups/confirm-remove.html.tmpl index 3249ee384..ef3e44a91 100644 --- a/template/en/default/admin/groups/confirm-remove.html.tmpl +++ b/template/en/default/admin/groups/confirm-remove.html.tmpl @@ -12,7 +12,7 @@ #%] [% IF regexp %] - [% title = "Confirm: Remove Explicit Members in the Regular Expression?" %] + [% title = "Confirm: Remove Explicit Members Using A Regular Expression?" %] [% ELSE %] [% title = "Confirm: Remove All Explicit Members?" %] [% END %] @@ -24,10 +24,10 @@ [% IF regexp %]

This option will remove all users from '[% group.name FILTER html %]' - whose login names match the regular expression: + whose email addresses match the regular expression: '[% regexp FILTER html %]'

[% ELSE %] -

This option will remove all explicitly defined users +

This option will remove all explicitly-added users from '[% group.name FILTER html %].'

[% END %] diff --git a/template/en/default/admin/groups/edit.html.tmpl b/template/en/default/admin/groups/edit.html.tmpl index 3e64fa7c4..5a20ef36e 100644 --- a/template/en/default/admin/groups/edit.html.tmpl +++ b/template/en/default/admin/groups/edit.html.tmpl @@ -165,7 +165,7 @@
- Remove all explicit memberships from users whose login names + Remove all explicit memberships from users whose email addresses match the following regular expression: diff --git a/template/en/default/admin/params/auth.html.tmpl b/template/en/default/admin/params/auth.html.tmpl index 06f85ed26..79fa8123b 100644 --- a/template/en/default/admin/params/auth.html.tmpl +++ b/template/en/default/admin/params/auth.html.tmpl @@ -93,29 +93,16 @@ "front page will require a login. No anonymous users will " _ "be permitted.", - webservice_email_filter => - "Filter email addresses returned by the WebService API depending on " _ - "if the user is logged in or not. This works similarly to how the " _ - "web UI currently filters email addresses. If requirelogin " _ - "is enabled, then this parameter has no effect as users must be logged " _ - "in to use Bugzilla.", - emailregexp => "This defines the regular expression to use for legal email addresses. " _ "The default tries to match fully qualified email addresses. " _ "Use .* to accept any email address following the " _ "RFC 2822 " _ - "specification. Another popular value to put here is ^[^@]+$, " _ - "which means 'local usernames, no @ allowed.'", + "specification.", emailregexpdesc => "This description explains valid addresses that " _ "are allowed by the emailregexp param.", - emailsuffix => "This is a string to append to any email addresses when actually " _ - "sending mail to that address. It is useful if you have changed " _ - "the emailregexp param to only allow local usernames, " _ - "but you want the mail to be delivered to username@my.local.hostname.", - createemailregexp => "This defines the (case-insensitive) regexp to use for email addresses that are " _ "permitted to self-register using a 'New Account' feature. The " _ "default (.*) permits any account matching the emailregexp " _ @@ -123,6 +110,13 @@ "will be permitted to create their own accounts and all accounts " _ "will have to be created by an administrator.", + use_email_as_login => "If switched on, users will log in with the email " _ + "address of the account. If switched off, they will " _ + "log in with a separate identifier.
" _ + "Switching this from off to on results in " _ + "the destructive act of the login name for all users " _ + "being set to their email address!", + password_complexity => "Set the complexity required for passwords. In all cases must the passwords " _ "be at least ${constants.USER_PASSWORD_MIN_LENGTH} characters long." _ diff --git a/template/en/default/admin/params/ldap.html.tmpl b/template/en/default/admin/params/ldap.html.tmpl index ab3521f27..d31aad825 100644 --- a/template/en/default/admin/params/ldap.html.tmpl +++ b/template/en/default/admin/params/ldap.html.tmpl @@ -35,10 +35,7 @@ LDAPmailattribute => "The name of the attribute of a user in your " _ "directory that contains the email address, to be " _ - "used as Bugzilla username. If this parameter " _ - "is empty, Bugzilla will use the LDAP username"_ - " as the Bugzilla username. You may also want" _ - " to set the \"emailsuffix\" parameter, in this case.", + "used to send the user email.", LDAPfilter => "LDAP filter to AND with the LDAPuidattribute for " _ "filtering the list of valid users." } diff --git a/template/en/default/admin/users/confirm-delete.html.tmpl b/template/en/default/admin/users/confirm-delete.html.tmpl index 4dab8b471..07b6ccb25 100644 --- a/template/en/default/admin/users/confirm-delete.html.tmpl +++ b/template/en/default/admin/users/confirm-delete.html.tmpl @@ -51,9 +51,15 @@ Field Value + [% IF !Param('use_email_as_login') %] + + Login: + [% otheruser.login FILTER html %] + + [% END %] - Login name: - [% otheruser.login FILTER html %] + Email address: + [% otheruser.email FILTER html %] Real name: diff --git a/template/en/default/admin/users/list.html.tmpl b/template/en/default/admin/users/list.html.tmpl index f90996882..168e6dd90 100644 --- a/template/en/default/admin/users/list.html.tmpl +++ b/template/en/default/admin/users/list.html.tmpl @@ -27,35 +27,44 @@ [% listselectionurlparams = INCLUDE listselectionurlparams %] [% columns = - [{name => 'login_name' - heading => 'Edit user...' - contentlink => 'editusers.cgi?action=edit&userid=%%userid%%' _ - listselectionurlparams - } - {name => 'realname' - heading => 'Real name' - } - {name => 'last_seen_date' - heading => 'Last Login' - } - {heading => 'Account History' - content => 'View' - contentlink => 'editusers.cgi?action=activity' _ - '&userid=%%userid%%' _ - listselectionurlparams + [{name => 'login_name' + heading => 'Edit user...' + contentlink => 'editusers.cgi?action=edit&userid=%%userid%%' _ + listselectionurlparams + }, + {name => 'email' + heading => 'Email address' + }, + {name => 'realname' + heading => 'Real name' + }, + {name => 'last_seen_date' + heading => 'Last Login' + }, + {name => 'view_history_link', + heading => 'Account History' + content => 'View' + contentlink => 'editusers.cgi?action=activity' _ + '&userid=%%userid%%' _ + listselectionurlparams + }, + {name => 'action_link', + heading => 'Action' + content => 'Delete' + contentlink => 'editusers.cgi?action=del' _ + '&userid=%%userid%%' _ + listselectionurlparams } ] -%] + %] + +[%# Eliminate inappropriate columns, starting at the end %] +[% IF NOT (Param('allowuserdeletion') && editusers) %] + [% CALL columns.splice(5, 1) %] +[% END %] -[% IF Param('allowuserdeletion') && editusers %] - [% columns.push({heading => 'Action' - content => 'Delete' - contentlink => 'editusers.cgi?action=del' _ - '&userid=%%userid%%' _ - listselectionurlparams - } - ) - %] +[% IF Param('use_email_as_login') %] + [% CALL columns.splice(1, 1) %] [% END %] [%# Disabled users are crossed out. Missing realnames are noticed in red. %] diff --git a/template/en/default/admin/users/search.html.tmpl b/template/en/default/admin/users/search.html.tmpl index 17477a012..f71589480 100644 --- a/template/en/default/admin/users/search.html.tmpl +++ b/template/en/default/admin/users/search.html.tmpl @@ -30,6 +30,7 @@

diff --git a/template/en/default/admin/users/userdata.html.tmpl b/template/en/default/admin/users/userdata.html.tmpl index c08cd0018..8f925e69a 100644 --- a/template/en/default/admin/users/userdata.html.tmpl +++ b/template/en/default/admin/users/userdata.html.tmpl @@ -17,13 +17,31 @@ var disable_mail_manually_set = [% (otheruser.email_disabled ? 1 : 0) FILTER js %]; +[% IF NOT Param('use_email_as_login') %] + + + + [% IF editusers %] + + [% ELSE %] + [% otheruser.login FILTER html %] + [% END %] + + +[% END %] - + + + [% IF editusers %] - + [% IF editform %] [% IF !otheruser.in_group('bz_sudo_protect') %]
@@ -32,7 +50,7 @@ [% END %] [% END %] [% ELSE %] - [% otheruser.login FILTER html %] + [% otheruser.email FILTER html %] [% END %] -- cgit v1.2.3-24-g4f1b