On 03/10/2010 03:28 PM, Thomas Mortagne 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 ? ;)
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)
I also prefer excludedUsersAndGroups, since our practice is to put the
configuration line in there, commented out, so it's not like the user
has to manually type it.
* 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)
+1
--
Sergiu Dumitriu
http://purl.org/net/sergiu/