Skip to content
Snippets Groups Projects
Commit bafd4c38 authored by Jean-Vincent Drean's avatar Jean-Vincent Drean
Browse files

XWIKI-7688 : Implement the user preferences configuration source

parent 4fd360b2
No related branches found
No related tags found
No related merge requests found
......@@ -37,20 +37,25 @@
@Singleton
public class UserPreferencesConfigurationSource extends AbstractDocumentConfigurationSource
{
/**
* Space name of the user class document.
*/
private static final String CLASS_SPACE_NAME = "XWiki";
/**
* Document name of the user class document.
*/
private static final String CLASS_PAGE_NAME = "XWikiUsers";
@Override
protected DocumentReference getClassReference()
{
// TODO: Not enabled yet. See #getDocumentReference().
return null;
return new DocumentReference(getCurrentWikiReference().getName(), CLASS_SPACE_NAME, CLASS_PAGE_NAME);
}
@Override
protected DocumentReference getDocumentReference()
{
// TODO: Not enabled yet. In order to enable it we need to make modifications so that
// DAB.getCurrentUser() returns a DocumentReference and not a String as otherwise it will create
// a stackoverflow (circular dependency): in order to create a DocumentReference we would need to
// use a factory which would need to use this configuration source.
return null;
return getDocumentAccessBridge().getCurrentUserReference();
}
}
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment