web/views/staticcontrollers.py
changeset 8325 7f2337d7937f
parent 8323 fe60a77ae4a7
child 8328 c53bbeea7870
--- a/web/views/staticcontrollers.py	Tue Mar 20 18:28:24 2012 +0100
+++ b/web/views/staticcontrollers.py	Tue Mar 20 18:29:13 2012 +0100
@@ -31,6 +31,7 @@
 from datetime import datetime, timedelta
 from logging import getLogger
 
+from cubicweb import Unauthorized
 from cubicweb.web import NotFound
 from cubicweb.web.http_headers import generateDateTime
 from cubicweb.web.controller import Controller
@@ -58,7 +59,7 @@
         if osp.isdir(path):
             if self.directory_listing_allowed:
                 return u''
-            raise NotFound(path)
+            raise Unauthorized(path)
         if not osp.isfile(path):
             raise NotFound()
         if not debugmode: