[Zope] LocalFS Overwrite local files option

Stefan H. Holek stefan@epy.co.at
Thu, 07 Feb 2002 21:19:21 +0100


At 07.02.2002 13:07 -0500, Anclo wrote:
>I want to protect image files in a LocalFS directory so they could not be 
>deleted or overwritten, so I disallowed the options Delete local files, 
>Delete objects, and Overwrite local files.
>
>But what does the option Overwrite local files really do? Zope does not 
>let me create 2 objects with the same ID whether this option is on or off.
>
>Thanks,
>
>Anclo

The below patch will fix the permission glitch.

HTH,
Stefan


--- LocalFS.py.orig  Fri May 25 14:16:26 2001
+++ LocalFS.py  Fri May 25 14:21:38 2001
@@ -675,7 +675,7 @@
              except: pass
          try: user=REQUEST['AUTHENTICATED_USER']
          except: user = None
-        if user is None or not user.has_permission('Overwrite files', self):
+        if user is None or not user.has_permission('Overwrite local 
files', self):
              raise 'Unauthorized', HTTPResponse()._error_html(
                      'Unauthorized',
                      "Sorry, you are not authorized to overwrite files.<p>")