On Wed, Mar 10, 2010 at 3:28 PM, Thomas Mortagne <[email protected]> wrote:
Hi dev,
I'm working on http://jira.xwiki.org/jira/browse/XWIKI-4606 and i would like to propose the following:
1) add a property than takes a list of users/groups I only found xwiki.stats.excludedUsers for now, xwiki.stats.excludedUsersAndGroups is a bit long an groups are meta users so it's ok, right ? ;)
Errr :) Even if it's longer xwiki.stats.excludedUsersAndGroups speaks for itself, +1 for it.
For each element of the list we get the document to know if it's a user of a group and recursively get groups users to produce a list of all users to filter. That means that StatUtils#getFilteredUsers would return a list of users without any group that would have been internally "resolved".
I plan to add this resolve tool in com.xpn.xwiki.plugin.rightsmanager.RightsManager for now, we can see latter if we want to add this in public apis (RightsManager*PluginApi classes).
For now i plan to have: * xwiki.stats.excludedUsers in xwiki.cfg (follow "xwiki.stats" propery naming) * statistics_excludedUsers in XWikiPreferencesmyxwiki.org (follow "statistics" property naming)
2) in all statistics search/get methods we filter theses users automatically by inserting them in the hql where clauses (all theses methods are mostly about creating the proper database query to get the result)