[xwiki-devs] [VOTE] Introduce api.Context.getUserReference()
Hi devs, I propose to expose XWikiContext.getUserReference() to the web API (api.Context), specifically: /** * Returns the document reference for the profile page of the current user which made the request. If there's no * currently logged in user in XWiki then the returned reference is for <i>XWiki.XWikiGuest</i> which represents any * anonymous user. The returned reference can always be considered an absolute document reference, meaning that * <code>getUserReference().getWikiReference().getName()</code> will always return the name of the user's wiki. * * @return The document reference for the current user which made the request. */ public DocumentReference getUserReference() { return getXWikiContext().getUserReference(); } Some more details are available at http://jira.xwiki.org/browse/XWIKI-6964 A pull request is available at https://github.com/xwiki/xwiki-platform/pull/23 Here's my +1 Thanks, Eduard
Although this has been pushed here's my +1 Note that in some not too long future we should also put the current user reference in the Execution Context directly. Thanks -Vincent On Sep 14, 2011, at 2:53 PM, Eduard Moraru wrote:
Hi devs,
I propose to expose XWikiContext.getUserReference() to the web API (api.Context), specifically:
/** * Returns the document reference for the profile page of the current user which made the request. If there's no * currently logged in user in XWiki then the returned reference is for <i>XWiki.XWikiGuest</i> which represents any * anonymous user. The returned reference can always be considered an absolute document reference, meaning that * <code>getUserReference().getWikiReference().getName()</code> will always return the name of the user's wiki. * * @return The document reference for the current user which made the request. */ public DocumentReference getUserReference() { return getXWikiContext().getUserReference(); }
Some more details are available at http://jira.xwiki.org/browse/XWIKI-6964
A pull request is available at https://github.com/xwiki/xwiki-platform/pull/23
Here's my +1
Thanks, Eduard
+1 On Wed, Sep 14, 2011 at 2:53 PM, Eduard Moraru <[email protected]> wrote:
Hi devs,
I propose to expose XWikiContext.getUserReference() to the web API (api.Context), specifically:
/** * Returns the document reference for the profile page of the current user which made the request. If there's no * currently logged in user in XWiki then the returned reference is for <i>XWiki.XWikiGuest</i> which represents any * anonymous user. The returned reference can always be considered an absolute document reference, meaning that * <code>getUserReference().getWikiReference().getName()</code> will always return the name of the user's wiki. * * @return The document reference for the current user which made the request. */ public DocumentReference getUserReference() { return getXWikiContext().getUserReference(); }
Some more details are available at http://jira.xwiki.org/browse/XWIKI-6964
A pull request is available at https://github.com/xwiki/xwiki-platform/pull/23
Here's my +1
Thanks, Eduard _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
-- Thomas Mortagne
On 09/14/2011 08:53 AM, Eduard Moraru wrote:
Hi devs,
I propose to expose XWikiContext.getUserReference() to the web API (api.Context), specifically:
/** * Returns the document reference for the profile page of the current user which made the request. If there's no * currently logged in user in XWiki then the returned reference is for <i>XWiki.XWikiGuest</i> which represents any * anonymous user. The returned reference can always be considered an absolute document reference, meaning that *<code>getUserReference().getWikiReference().getName()</code> will always return the name of the user's wiki. * * @return The document reference for the current user which made the request. */ public DocumentReference getUserReference() { return getXWikiContext().getUserReference(); }
Some more details are available at http://jira.xwiki.org/browse/XWIKI-6964
A pull request is available at https://github.com/xwiki/xwiki-platform/pull/23
Here's my +1
+1. -- Sergiu Dumitriu http://purl.org/net/sergiu/
+1 Thanks, Marius On Wed, Sep 14, 2011 at 6:52 PM, Sergiu Dumitriu <[email protected]> wrote:
On 09/14/2011 08:53 AM, Eduard Moraru wrote:
Hi devs,
I propose to expose XWikiContext.getUserReference() to the web API (api.Context), specifically:
/** * Returns the document reference for the profile page of the current user which made the request. If there's no * currently logged in user in XWiki then the returned reference is for <i>XWiki.XWikiGuest</i> which represents any * anonymous user. The returned reference can always be considered an absolute document reference, meaning that *<code>getUserReference().getWikiReference().getName()</code> will always return the name of the user's wiki. * * @return The document reference for the current user which made the request. */ public DocumentReference getUserReference() { return getXWikiContext().getUserReference(); }
Some more details are available at http://jira.xwiki.org/browse/XWIKI-6964
A pull request is available at https://github.com/xwiki/xwiki-platform/pull/23
Here's my +1
+1.
-- Sergiu Dumitriu http://purl.org/net/sergiu/ _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
participants (5)
-
Eduard Moraru -
Marius Dumitru Florea -
Sergiu Dumitriu -
Thomas Mortagne -
Vincent Massol