comparison roundup/cgi/client.py @ 2871:1629b3e303d2 maint-0.7

merge(ish) from HEAD
author Richard Jones <richard@users.sourceforge.net>
date Fri, 05 Nov 2004 04:57:50 +0000
parents d57c06dcb4c2
children e8d22f8ff35a
comparison
equal deleted inserted replaced
2868:80a9419bd5c7 2871:1629b3e303d2
1 # $Id: client.py,v 1.176.2.6 2004-10-26 07:59:28 richard Exp $ 1 # $Id: client.py,v 1.176.2.7 2004-11-05 04:57:50 richard Exp $
2 2
3 """WWW request handler (also used in the stand-alone server). 3 """WWW request handler (also used in the stand-alone server).
4 """ 4 """
5 __docformat__ = 'restructuredtext' 5 __docformat__ = 'restructuredtext'
6 6
443 if not props.has_key('type'): 443 if not props.has_key('type'):
444 raise NotFound, designator 444 raise NotFound, designator
445 if not props.has_key('content'): 445 if not props.has_key('content'):
446 raise NotFound, designator 446 raise NotFound, designator
447 447
448 # make sure we have permission
449 if not self.db.security.hasPermission('View', self.userid, classname):
450 raise Unauthorised, self._("You are not allowed to view "
451 "this file.")
452
448 mime_type = klass.get(nodeid, 'type') 453 mime_type = klass.get(nodeid, 'type')
449 content = klass.get(nodeid, 'content') 454 content = klass.get(nodeid, 'content')
450 lmt = klass.get(nodeid, 'activity').timestamp() 455 lmt = klass.get(nodeid, 'activity').timestamp()
451 456
452 self._serve_file(lmt, mime_type, content) 457 self._serve_file(lmt, mime_type, content)

Roundup Issue Tracker: http://roundup-tracker.org/