New basic User API

Following Add a new XWikiUser.displayHiddenDocuments() API here’s a first basic API proposal so that we can move forward.


  • My goal isn’t to provide a full API at this stage but if you see important missing methods or if you’d do things differently, let me know.
  • I have a first version of the implementation done (missing tests ATM).
  • @surli I’m not sure why we’d need Loading... since the goal of this API is to abstract from the implementation, i.e. users of the API shouldn’t need to care how the user is stored. Maybe your need is transient and only there because we don’t have a full user API yet? My POV is that we shouldn’t rely on the fact that a user is implemented in a wiki page. And if the need is transient it should go in some transient class but not in the new API proper. WDYT?

Feedback most welcome. I’m sure I’m missing stuff since I did this very quickly!

1 Like

I now have full unit tests for the new user api code :slight_smile:

And I have now locally on my computer modified all places in platform that were calling for displayHiddenDocuments so that it goes through te new API, thus cleaning implementing Loading...

Just waiting for the go-ahead from other committers.

Well the need was more about being able to check that a user exist, with a reference to perform this checks. AFAICS your new design almost allows it: we just need an exist() method in UserManager which would take a UserReference.

So +1 for the new API with this method in it.

Implemented in Loading...