Correct SSH Username to be just Username
Slightly clarify the UI to just say Username now, since that's the name we use internally in the code, and in the database. Change-Id: Ide4a10f6b2795ea8ba30d3aff22c0672bba5bd91 Signed-off-by: Shawn O. Pearce <sop@google.com>
This commit is contained in:
@@ -49,9 +49,9 @@ Idle::
|
|||||||
alive resets the idle timer, about once a minute.
|
alive resets the idle timer, about once a minute.
|
||||||
|
|
||||||
User::
|
User::
|
||||||
The SSH User Name of the account that is authenticated on
|
The username of the account that is authenticated on this
|
||||||
this connection. If the -n option is used, this column
|
connection. If the -n option is used, this column shows
|
||||||
shows the Account Id instead.
|
the Account Id instead.
|
||||||
|
|
||||||
Remote Host::
|
Remote Host::
|
||||||
Reverse lookup hostname, or if -n option is used, the remote
|
Reverse lookup hostname, or if -n option is used, the remote
|
||||||
|
|||||||
@@ -45,9 +45,9 @@ public interface AccountConstants extends Constants {
|
|||||||
String buttonOpenSshKey();
|
String buttonOpenSshKey();
|
||||||
String buttonAddSshKey();
|
String buttonAddSshKey();
|
||||||
|
|
||||||
String sshUserName();
|
String userName();
|
||||||
String buttonChangeSshUserName();
|
String buttonChangeUserName();
|
||||||
String invalidSshUserName();
|
String invalidUserName();
|
||||||
|
|
||||||
String sshKeyInvalid();
|
String sshKeyInvalid();
|
||||||
String sshKeyAlgorithm();
|
String sshKeyAlgorithm();
|
||||||
|
|||||||
@@ -25,9 +25,9 @@ buttonClearSshKeyInput = Clear
|
|||||||
buttonOpenSshKey = Open Key ...
|
buttonOpenSshKey = Open Key ...
|
||||||
buttonAddSshKey = Add
|
buttonAddSshKey = Add
|
||||||
|
|
||||||
sshUserName = SSH Username
|
userName = Username
|
||||||
buttonChangeSshUserName = Change Username
|
buttonChangeUserName = Change Username
|
||||||
invalidSshUserName = SSH username must contain only letters, numbers, _, - or .
|
invalidUserName = Username must contain only letters, numbers, _, - or .
|
||||||
|
|
||||||
sshKeyInvalid = Invalid Key
|
sshKeyInvalid = Invalid Key
|
||||||
sshKeyAlgorithm = Algorithm
|
sshKeyAlgorithm = Algorithm
|
||||||
|
|||||||
@@ -97,13 +97,13 @@ class SshPanel extends Composite {
|
|||||||
final FlowPanel body = new FlowPanel();
|
final FlowPanel body = new FlowPanel();
|
||||||
|
|
||||||
userNameTxt = new NpTextBox();
|
userNameTxt = new NpTextBox();
|
||||||
userNameTxt.addKeyPressHandler(new SshUserNameValidator());
|
userNameTxt.addKeyPressHandler(new UserNameValidator());
|
||||||
userNameTxt.addStyleName(Gerrit.RESOURCES.css().sshPanelUsername());
|
userNameTxt.addStyleName(Gerrit.RESOURCES.css().sshPanelUsername());
|
||||||
userNameTxt.setVisibleLength(16);
|
userNameTxt.setVisibleLength(16);
|
||||||
userNameTxt.setReadOnly(!canEditSshUserName());
|
userNameTxt.setReadOnly(!canEditUserName());
|
||||||
|
|
||||||
changeUserName = new Button(Util.C.buttonChangeSshUserName());
|
changeUserName = new Button(Util.C.buttonChangeUserName());
|
||||||
changeUserName.setVisible(canEditSshUserName());
|
changeUserName.setVisible(canEditUserName());
|
||||||
changeUserName.setEnabled(false);
|
changeUserName.setEnabled(false);
|
||||||
changeUserName.addClickHandler(new ClickHandler() {
|
changeUserName.addClickHandler(new ClickHandler() {
|
||||||
@Override
|
@Override
|
||||||
@@ -122,7 +122,7 @@ class SshPanel extends Composite {
|
|||||||
userNameRow.add(userNameTxt);
|
userNameRow.add(userNameTxt);
|
||||||
userNameRow.add(changeUserName);
|
userNameRow.add(changeUserName);
|
||||||
|
|
||||||
row(userInfo, 0, Util.C.sshUserName(), userNameRow);
|
row(userInfo, 0, Util.C.userName(), userNameRow);
|
||||||
userInfo.getCellFormatter().addStyleName(0, 0,
|
userInfo.getCellFormatter().addStyleName(0, 0,
|
||||||
Gerrit.RESOURCES.css().topmost());
|
Gerrit.RESOURCES.css().topmost());
|
||||||
userInfo.getCellFormatter().addStyleName(0, 0,
|
userInfo.getCellFormatter().addStyleName(0, 0,
|
||||||
@@ -220,7 +220,7 @@ class SshPanel extends Composite {
|
|||||||
initWidget(body);
|
initWidget(body);
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean canEditSshUserName() {
|
private boolean canEditUserName() {
|
||||||
return Gerrit.getConfig().canEdit(Account.FieldName.USER_NAME);
|
return Gerrit.getConfig().canEdit(Account.FieldName.USER_NAME);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -239,7 +239,7 @@ class SshPanel extends Composite {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void doChangeUserName() {
|
void doChangeUserName() {
|
||||||
if (!canEditSshUserName()) {
|
if (!canEditUserName()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -279,7 +279,7 @@ class SshPanel extends Composite {
|
|||||||
|
|
||||||
void invalidUserName() {
|
void invalidUserName() {
|
||||||
userNameTxt.setFocus(true);
|
userNameTxt.setFocus(true);
|
||||||
new ErrorDialog(Util.C.invalidSshUserName()).center();
|
new ErrorDialog(Util.C.invalidUserName()).center();
|
||||||
}
|
}
|
||||||
|
|
||||||
void doBrowse() {
|
void doBrowse() {
|
||||||
@@ -477,7 +477,7 @@ class SshPanel extends Composite {
|
|||||||
addKeyBlock.setVisible(show);
|
addKeyBlock.setVisible(show);
|
||||||
}
|
}
|
||||||
|
|
||||||
private final class SshUserNameValidator implements KeyPressHandler {
|
private final class UserNameValidator implements KeyPressHandler {
|
||||||
@Override
|
@Override
|
||||||
public void onKeyPress(final KeyPressEvent event) {
|
public void onKeyPress(final KeyPressEvent event) {
|
||||||
final char code = event.getCharCode();
|
final char code = event.getCharCode();
|
||||||
|
|||||||
@@ -34,7 +34,7 @@
|
|||||||
<h2>Sign In</h2>
|
<h2>Sign In</h2>
|
||||||
<table border="0">
|
<table border="0">
|
||||||
<tr>
|
<tr>
|
||||||
<th>SSH Username:</th>
|
<th>Username:</th>
|
||||||
<td>
|
<td>
|
||||||
<form method="GET">
|
<form method="GET">
|
||||||
<input type="text" size="30" name="ssh_user_name" />
|
<input type="text" size="30" name="ssh_user_name" />
|
||||||
|
|||||||
Reference in New Issue
Block a user