Item11619: USERINFO does not work for BaseUserMapping IDs
Priority: Enhancement
Current State: Confirmed
Released In: n/a
Target Release: major
These should return appropriate information, shouldn't they?
cuid
login
wikiname
--
MichaelDaum - 07 Mar 2012
Please add to the
USERINFO testcase.
test/unit/Fn_USERINFO.pm
Actually I think the issue is in the Mapper and the way that the
BaseUserMapper sits along side the installed Mapper. Fixing it in the
USERINFO macro would probably not be the right way to go. If
USERINFO is wrong, it's because
$this->{users}->getLoginName($user);
is not returning the right information. I think this is probably related to a much deeper issue identified in
Item11578. IMO much too risky for 1.1.5.
--
GeorgeClark - 07 Mar 2012
VarUSERINFO
I don't actually see anything in the docco that indicates what the _DEFAULT can be.
however - looking at the code:
my $cuid = $this->{users}->getCanonicalUserID($user);
Which does not convert a
cuid
into a
cuid
.
so - its plausibly working as designed - but needs changing.
The docco in the code and for the macro needs help too.
I think its worked this way since 4.0.3.
several things need to be done:
- more information in the docco
- unit tests
- add a way to convert cuid's into user facing text
- an error text - for 'user does not exist' customisation , atm, you get blank string for any error condition
--
SvenDowideit - 08 Mar 2012
added unit tests for current functionality
--
SvenDowideit - 08 Mar 2012
First problem I see is that the call to
getMapping()
is only checking for the
$identifier
as a login name, not using it as a WikiNAme or cUID.
Strange, so it shouldn't even work for WikiNames? If it does why? Hm.
--- lib/Foswiki/Users.pm (revision 14214)
+++ lib/Foswiki/Users.pm (working copy)
@@ -470,7 +470,7 @@
else {
# See if a mapping recognises the identifier as a login name
- my $mapping = $this->_getMapping( undef, $identifier, undef, 1 );
+ my $mapping = $this->_getMapping( $identifier, $identifier, $identifier, 1 );
--
MichaelDaum - 08 Mar 2012
that is
not where the code should change. Doing so would change (ie break) a lot more things than
USERINFO.
--
SvenDowideit - 10 Mar 2012
y
--
MichaelDaum - 10 Mar 2012