mirror of
https://we.phorge.it/source/phorge.git
synced 2025-01-22 20:51:10 +01:00
Update "Change Username" instructions to be less foreboding
Summary: Ref T13420. These warnings are currently more severe than they need to be; weaken them. Among other cases, the upstream supports and encourages changing usernames when users change human names. The login/password instructions are also out of date since sessions were decoupled from usernames about a year ago. Test Plan: Hit dialog as an administrator Maniphest Tasks: T13420 Differential Revision: https://secure.phabricator.com/D20826
This commit is contained in:
parent
b1d4d5c00c
commit
058b7ae945
1 changed files with 23 additions and 29 deletions
|
@ -43,32 +43,25 @@ final class PhabricatorPeopleRenameController
|
|||
|
||||
}
|
||||
|
||||
$inst1 = pht(
|
||||
'Be careful when renaming users!');
|
||||
$instructions = array();
|
||||
|
||||
$inst2 = pht(
|
||||
'The old username will no longer be tied to the user, so anything '.
|
||||
'which uses it (like old commit messages) will no longer associate '.
|
||||
'correctly. (And, if you give a user a username which some other user '.
|
||||
'used to have, username lookups will begin returning the wrong user.)');
|
||||
$instructions[] = pht(
|
||||
'If you rename this user, the old username will no longer be tied '.
|
||||
'to the user account. Anything which uses the old username in raw '.
|
||||
'text (like old commit messages) may no longer associate correctly.');
|
||||
|
||||
$inst3 = pht(
|
||||
'It is generally safe to rename newly created users (and test users '.
|
||||
'and so on), but less safe to rename established users and unsafe to '.
|
||||
'reissue a username.');
|
||||
$instructions[] = pht(
|
||||
'It is generally safe to rename users, but changing usernames may '.
|
||||
'create occasional minor complications or confusion with text that '.
|
||||
'contains the old username.');
|
||||
|
||||
$inst4 = pht(
|
||||
'Users who rely on password authentication will need to reset their '.
|
||||
'password after their username is changed (their username is part of '.
|
||||
'the salt in the password hash).');
|
||||
|
||||
$inst5 = pht(
|
||||
$instructions[] = pht(
|
||||
'The user will receive an email notifying them that you changed their '.
|
||||
'username, with instructions for logging in and resetting their '.
|
||||
'password if necessary.');
|
||||
'username.');
|
||||
|
||||
$instructions[] = null;
|
||||
|
||||
$form = id(new AphrontFormView())
|
||||
->setUser($viewer)
|
||||
->appendChild(
|
||||
id(new AphrontFormStaticControl())
|
||||
->setLabel(pht('Old Username'))
|
||||
|
@ -79,19 +72,20 @@ final class PhabricatorPeopleRenameController
|
|||
->setValue($username)
|
||||
->setName('username'));
|
||||
|
||||
return $this->newDialog()
|
||||
->setWidth(AphrontDialogView::WIDTH_FORM)
|
||||
$dialog = $this->newDialog()
|
||||
->setTitle(pht('Change Username'))
|
||||
->setValidationException($validation_exception)
|
||||
->appendParagraph($inst1)
|
||||
->appendParagraph($inst2)
|
||||
->appendParagraph($inst3)
|
||||
->appendParagraph($inst4)
|
||||
->appendParagraph($inst5)
|
||||
->appendParagraph(null)
|
||||
->setValidationException($validation_exception);
|
||||
|
||||
foreach ($instructions as $instruction) {
|
||||
$dialog->appendParagraph($instruction);
|
||||
}
|
||||
|
||||
$dialog
|
||||
->appendForm($form)
|
||||
->addSubmitButton(pht('Rename User'))
|
||||
->addCancelButton($done_uri);
|
||||
|
||||
return $dialog;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue