[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: hide attribute



Pierangelo Masarati <ando@sys-net.it> wrote:

> The suggested "feature", on the contrary, seems to be a little bit more
> linear: the administrator decides that some attributes (e.g. bandwidth
> intensive ones) are not shown by default, unless explicitly requested.
> I see a parallel with soft and hard search limits: the soft limit 
> applies, unless a specifically requested limit is present.  In that 
> case, the requested limit applies, provided it complies with the hard limit.

I wonder what is the best way of implementing such an overlay:

1) search with attrsonly=1 before the real search
if attribute list is NULL and attrsonly=0 {
        perform searches with attrsonly=1
        gather le list of returned attributes
        filter out the cloaked ones
        modify the original search operation to use that attribute set
}
perform the search

2) set a callback on search operations
if attribute list is NULL and attrsonly=0 {
        set a callback on search
}
perform the search
if called back {
        filter out cloaked attributes
}

Approach one duplicate the search, and it can waste some time, but it
avoid fetching the cloaked attribute. If it is dynamically generated,
there can be some benefit.

-- 
Emmanuel Dreyfus
http://hcpnet.free.fr/pubz
manu@netbsd.org