Re: [viewvc-users] forbiddenre not quite working

"C. Michael Pilato" <[email protected]>
Newsgroups gmane.comp.version-control.cvs.viewcvs.user
Organization CollabNet, Inc.
Message-ID <[email protected]>
Dave Holland wrote:
> On Tue, May 25, 2010 at 02:19:13PM -0400, C. Michael Pilato wrote:
>> I hate to ask, but it's already bitten me with another debugging situation
>> today, so here goes:  is the browser cache getting in the way?  Try setting
>> http_expiration_time=0 and generate_etags=0 in viewvc.conf, clearing your
>> browser cache, and re-hitting the root listing page.
> 
> Fair point - I'd disabled use of the web proxy but not thought about
> etags etc, thanks. Unfortunately setting those variables didn't help.
> 
> I'm not fluent in Python. However, it appears that is_forbidden isn't
> being called anywhere in the view_roots code path. Here's a pretty
> crude hack that that calls is_forbidden in load_config, which is
> probably the wrong place to do it, and (I think) isn't sensible if you
> use forbidden rather than forbiddenre. I think it would be better to
> put the check in view_roots but I don't know enough Python to unpick
> the data structures there. Help, please?

No, you're right.  I overlooked the fact that you were talking about ViewVC
1.0.x in your original report.  That line doesn't bother trying to filter
out the roots at all, so what you're seeing isn't a bug.  The configuration
instructions for 'forbiddenre' say (among other things):

# This is similar to 'forbidden', but differs in some key ways:

And the instructions for 'forbidden' say (among other things):

# NOTE: This is for the hiding of modules within repositories, *not*
# for the hiding of repositories (roots) themselves.

Neither was designed to hide the names of roots altogether.

Your patch is a sane one, but I hesitate to bother changing this behavior in
the 1.0 line now because 1.1.x has been out for over a year and already
handles this case correctly.  Is an upgrade to 1.1.5 an option for your
organization?

-- 
C. Michael Pilato <[email protected]>
CollabNet   <>   www.collab.net   <>   Distributed Development On Demand

------------------------------------------------------
http://viewvc.tigris.org/ds/viewMessage.do?dsForumId=4255&dsMessageId=2613714

To unsubscribe from this discussion, e-mail: [[email protected]].
signature.asc (application/pgp-signature, 197 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)

iEYEARECAAYFAkv9X8UACgkQokEGqRcG/W5aiACfTm7ZZ87LKYF93yLV6LKUjrtL
G9kAn1vXaKJtiRCy/Sb/olApziO5FcGu
=k/lg
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.