Hi devs,
I've been brainstorming with Jean-Vincent about how to implement hiding technical
content for 4.0. Here's what we would like to do:
Note: This is related to the proposal I made earlier:
http://markmail.org/thread/jupn22fdk4nnqj6p
In summary:
* Add a RoleVisibilityClass XObject to documents and spaces (in WebPreferences for Spaces)
which is a list of Roles (simple or advanced users for now) deciding which role should be
allowed to view a given document in result sets.
* Either modify XWikiHibernateStore or introduce a new FilteredHibernateStore store which
would delegate to XWikiHibernateStore (same mechanism as the cache store) to add the JOIN
to check the visibility and only return visible documents for the current user
* Remove the notion of hidden documents and have a migrator to remove the column in
xwikidocs
* Modify the Lucene plugin to add a VISIBILITY field and return filtered results based on
the visibility and the current user role
* Note1: After much brainstorming we think that the notion of "application"
could be implemented either with an Application XObject that tie the document to an
application or with an Application Descriptor.
* Note2: We'll need to decide at some point if we want more roles than just
"simple user" and "advanced user" and if we need "developer"
and "admin" too.
* Notes1 and 2 are currently out of scope for this proposal
However we're wondering how much performance we will loose with this implementation
using XObjects (due to the extra JOIN).
Do you think it's acceptable?
Could it be improved with custom mapping? (I think not)
Should we implement this without XObjects and instead modify XWikiDocuments and add a new
column in xwikidocs?
Thanks
-Vincent