Vincent Massol wrote: > On Jun 6, 2009, at 2:24 PM, Thomas Mortagne wrote: > >> On Sat, Jun 6, 2009 at 10:38, Vincent Massol<[email protected]> >> wrote: >>> Hi everyone, >>> >>> Current situation >>> ============= >>> >>> Right now we have 2 mechanisms in place: >>> - hidden docs. These is done deep at the storage level and hidden >>> docs >>> don't appear in any HQL queries. This is >>> - $blacklistedSpaces in xwikivars.vm which is used (or not!, that's >>> the problem) in some wiki pages (AllDocs, Search, Dashboard, etc) >>> >>> Need >>> ==== >>> >>> We have a need for blacklisted/hidden docs and spaces. This is >>> different than rights. This is just for presentation purpose. >>> >>> The need I see is: >>> - guest and simple users should not see blacklisted/hidden docs and >>> spaces >>> - advanced users and admin should see them >>> >>> (Note: I'm not sure we have a need to blacklist docs/spaces for >>> everyone including admins as it's currently done for hidden docs) >> I think I would prefer each user to be able to indicate if he wants >> filtering or not by default and it should be very easy to switch from >> a mode to another, like when we search for something not having to go >> to our user profile change some configuration and then return to >> search to see hidden doc and them reset the hidden mode... For me this >> has nothing to do with rights or types of users, this could be used to >> find the DEFAULT value of the hidden mode but not THE value. > > I really don't want to add more complexity for users. We already have > the notion of simple/advanced users and this use case fits perfectly > with that notion. Simple users should never see hidden docs/spaces > since those are for developers.
+1. Users shouldn't see hidden documents at all. Why would a simple user be interested in the application's code? That's just for developers. >>> Issues >>> ===== >>> >>> 1) In lots of spaces we don't exclude blacklisted spaces since at >>> every location you have to add specific code to do the exclude. >>> 2) Hidden docs are a problem since there are cases we want to see >>> them all (like when creating a new wiki and you need to copy a >>> template wiki containing hidden docs) >>> >>> Proposal >>> ======= >>> >>> * I believe we need to remove the filtering at the storage level. >>> That >>> level should return all docs matching the queries >> +1 this has nothing to do at this level >> >>> * We modify the default XWiki.searchDocument APIs so that they filter >>> on hidden docs and blacklisted spaces (using the velocity >>> $blacklistedSpaces variable). This would be changed later on when we >>> implement the new model and introduce the notion of space. When this >>> happen we'll be able to have hidden metadata to the Space object. >> Agree with Anca, +1 only if this filtering is in public apis. > > Yes the idea is to put it in the public API. > > -Vincent > >>> * We add a new XWiki.searchDocument API that doesn't do any filtering I did the initial filtering at the storage level since there are too many search methods, and changing all of them was too much. In the storage, there was only one place to change. -- Sergiu Dumitriu http://purl.org/net/sergiu/ _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs

