+1, a very good time to get back on track
However, I have currently protected the XWikiCachingRightService from those
issues, we could simplify it later if wanted.
On Thu, Mar 21, 2013 at 6:17 PM, Sergiu Dumitriu <sergiu(a)xwiki.org> wrote:
On 03/21/2013 01:13 PM, Thomas Mortagne wrote:
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
+1 as well. I tried to refactor that code a couple of times, but I got
into some problems with backwards compatibility so I dropped it. If we
decide that we want to change the behavior, go for it.
--
Sergiu Dumitriu
http://purl.org/net/sergiu
_______________________________________________
devs mailing list
devs(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/devs
--
Denis Gervalle
SOFTEC sa - CEO