Some users have usernames that aren't valid as project shortnames (old historical usernames probably). For these users, the Auth Provider can provide an alternate user-project name for that user. When this happens, and you go to the URL using the invalid name like /u/foo_bar/ then you can get errors like this:
File '/allura/Allura/allura/controllers/project.py', line 111 in _lookup
user=user, user_project=True)
File '/allura/Allura/allura/model/neighborhood.py', line 129 in register_project
self, shortname, project_name, user or getattr(c, 'user', None), user_project, private_project, apps)
File '/allura/Allura/allura/lib/plugin.py', line 785 in register_project
project_name, user, user_project, private_project)
File '/allura/Allura/allura/lib/plugin.py', line 828 in validate_project
'%s already exists in nbhd %s' % (shortname, neighborhood._id))
ProjectConflict: u/foo-bar already exists in nbhd 559d5efa5421060005224016
db/7916
To test with local provider:
_to a valid char inre_project_nameinhelpers.py_in usernamere_project_nameback/u/user_nameand see that it redirs to/u/user-nameSimilar test can be done with SF's provider and the final result works.
Tested with both providers and it works good! SF's provider even does not 404 :) Merged.