On Mon, Mar 15, 2010 at 16:46, Thomas Mortagne
<thomas.mortagne(a)xwiki.com> wrote:
On Wed, Mar 10, 2010 at 15:28, Thomas Mortagne
<thomas.mortagne(a)xwiki.com> 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)
* 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)
Another things: I'm not sure what to do about unexisting users and groups.
a) remove them from the list
b) don't remove them from the list
Currently i implemented a) because it make more sense at RightsManager
level and in the way i implemented it but it means that it's
impossible to filter some user that has been deleted.
(Note that i only talk about really not existing users and groups,
virtual users like superadmin and xwikiguest are supported/not
removed)
Maybe the non existing users filtering is another feature to enable
disable which has nothing to do with excludedUsersAndGroups option.
WDYT ?
Thanks
--
Thomas Mortagne
--
Thomas Mortagne
--
Thomas Mortagne