Respect "can edit username" in registration UI
Summary:
Fixes T3741. The flag is respected in terms of actually creating the account, but the UI is a bit unclear.
This can never occur naturally, but installs can register an event which locks it.
Test Plan:
Artificially locked it, verified I got more reasonable UI;
{F81282}
Reviewers: btrahan, datr
Reviewed By: datr
CC: aran
Maniphest Tasks: T3741
Differential Revision: https://secure.phabricator.com/D7577
This commit is contained in:
@@ -326,13 +326,20 @@ final class PhabricatorAuthRegisterController
|
||||
}
|
||||
|
||||
|
||||
$form
|
||||
->appendChild(
|
||||
if ($can_edit_username) {
|
||||
$form->appendChild(
|
||||
id(new AphrontFormTextControl())
|
||||
->setLabel(pht('Phabricator Username'))
|
||||
->setName('username')
|
||||
->setValue($value_username)
|
||||
->setError($e_username));
|
||||
} else {
|
||||
$form->appendChild(
|
||||
id(new AphrontFormMarkupControl())
|
||||
->setLabel(pht('Phabricator Username'))
|
||||
->setValue($value_username)
|
||||
->setError($e_username));
|
||||
}
|
||||
|
||||
if ($must_set_password) {
|
||||
$form->appendChild(
|
||||
|
||||
Reference in New Issue
Block a user