Page MenuHomePhabricator

Add config to require real name, respect config when creating new users, drop real name from full name if not provided.
ClosedPublic

Authored by lpriestley on May 9 2014, 5:06 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Dec 22, 4:05 AM
Unknown Object (File)
Sat, Dec 21, 1:27 AM
Unknown Object (File)
Fri, Dec 20, 12:44 PM
Unknown Object (File)
Fri, Dec 20, 12:17 PM
Unknown Object (File)
Fri, Dec 20, 11:57 AM
Unknown Object (File)
Mon, Dec 9, 1:49 PM
Unknown Object (File)
Thu, Dec 5, 8:24 AM
Unknown Object (File)
Tue, Dec 3, 1:16 PM
Subscribers
Tokens
"Pterodactyl" token, awarded by epriestley.

Details

Summary

Fixes T4728, first pass, Make real name optional on user accounts

Test Plan

Default real name config should be false (not required). Create new user, real name should not be required. Toggle config, real name should be required. Users with no real name should be always listed by their usernames.

Diff Detail

Repository
rP Phabricator
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

lpriestley retitled this revision from to Add config to require real name, respect config when creating new users, drop real name from full name if not provided..
lpriestley updated this object.
lpriestley edited the test plan for this revision. (Show Details)
lpriestley added a reviewer: epriestley.
lpriestley edited edge metadata.

Switching double negative

epriestley edited edge metadata.

This looks great -- two small tweaks inline.

src/applications/people/config/PhabricatorUserConfigOptions.php
40–41

You can make this slightly more user friendly by giving the options better labels with setBoolOptions(), e.g.:

->setBoolOptions(
  array(
    pht('Make real names required'),
    pht('Make real names optional'),
  ))

This should make the dropdown have more explicit options, instead of "True" / "False".

src/applications/people/controller/PhabricatorPeopleProfileController.php
32–38

Here, I think we have an opportunity to simplify things by just calling:

->setHeader($user->getFullName())

...and in the two cases below. We could have done this before, but now that the logic is more complicated it's more worthwhile.

This revision now requires changes to proceed.May 10 2014, 2:21 AM
lpriestley edited edge metadata.

Addressing review

epriestley edited edge metadata.

Perfect, thanks!

This revision is now accepted and ready to land.May 12 2014, 4:51 PM
epriestley updated this revision to Diff 21561.

Closed by commit rPdfcccd4cb882 (authored by @lpriestley, committed by @epriestley).