Hi devs,
Following
http://markmail.org/message/snnlesexie4ox3i5 I would like to
modify user related methods in XWikiDocument to behave like the what
has been voted for XWikiContext and follow the same logic.
As a reminder here it is: not logged in user (guest) reference is
null. Plain and simple.
The idea would be to do exactly the same thing than XWikiContext
meaning that old String APIs continue to deal with "XWikiGuest" and do
convertions for retro compatibility especially with existing
databases.
It will change the behavior of XWikiDocument#getUserReference() from
external point of view so it's a breakage but we might actually fix
more bugs than we create when thinking about codes like
context.setUserRefererence(document.getAuthorReference()) or
$context.userReference == $doc.authorReference which I'm sure we can
find here and there.
5.0 and new right service is a good occasion for this improvement.
WDYT ?
Here is my +1
--
Thomas Mortagne