Feature Proposal: /cgi-bin/view/~jsmith to be redirected to /cgi-bin/view/Main/JaneSmith
Motivation
It's handy to go to a user's topic simply by ~loginname, more specifically
http://twiki.company.com/cgi-bin/view/~loginname
. This is especially the case if one or more of the following conditions are met.
- login names are different from wikinames and shorter
- UserSubwebs is in effect
Description and Documentation
Description of what this feature should do
It would be nice if it can be implemented purely in a user mapping handler or a plug-in.
But that doesn't seem to be the case.
TWiki::new() needs to see ~loginname in PATH_INFO and then it needs to use
$session->users->getWikiName($session->{users}->getCanonicalUserID($login))
to find the corresponding wikiname.
Then, for the script handler body (e.g. TWiki::UI::View::view()) to redirect if needed, $session->{tildeLoginName} is to be set to true.
Examples
Impact
Implementation
--
Contributors: HideyoImazu - 2012-08-14
Discussion
Sounds good. It does not clash with valid web names.
What happens if the user is not logged in?
--
PeterThoeny - 2012-08-14
It doesn't matter. /cgi-bin/view/~loginname would be just an alias of /cgi-bin/view/Main/FirstLast.
--
HideyoImazu - 2012-08-14
Ah, I misunderstood
/~login (now documented as
/~loginname) as a literal string , not
/~jsmith for
/Main/JaneSmith.
--
PeterThoeny - 2012-08-14