I can't believe that no one has ever had to "restrict
directory listings". What we wanted was to be able to
"restrict" who had access to viewing directory
listings. (Similar to the Apache "Directory Listings
off" command (or whatever its called))
Google was no help, neither was Sourceforge.
So, in the spirit of open source, I modified it.
The short answer is that I simply added a dtml-if
around the table that displays the directory listings.
-----------------
<dtml-if "AUTHENTICATED_USER.has_permission('Access
contents information', this())">
<h1>Directory listing of <!--#var serverPath--></h1>
blah blah
[sniip]
<dtml-else>
<H1>Directory Listing Not Allowed</H1>
</dtml-if "DDD: Access contents information">
-----------
Here is the output of a diff on dtml/methodBrowse.dtml
[root@dev dtml]# more methodBrowse.diff
4d3
< <dtml-if "AUTHENTICATED_USER.has_permission('Access
contents information', thi
s())">
31,36d29
<
< <dtml-else>
< <B>Directory Listing Not Allowed</B>
< </dtml-if "DDD: 2004-05-05 Access contents information">
<
<
diff for methodBrowse.dtml