]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/commitdiff
don't provide the "overwrite" button if the file is readonly to you
authorZooko O'Whielacronx <zooko@zooko.com>
Sat, 10 Nov 2007 23:07:05 +0000 (16:07 -0700)
committerZooko O'Whielacronx <zooko@zooko.com>
Sat, 10 Nov 2007 23:07:05 +0000 (16:07 -0700)
src/allmydata/webish.py

index afd808f5eb08e2e993d3904d6a452d013d9ffc75..5e9f9550dcc19360edf19d08e286777f30283ad5 100644 (file)
@@ -334,7 +334,7 @@ class Directory(rend.Page):
 
     def render_overwrite(self, ctx, data):
         name, target = data
-        if IMutableFileNode.providedBy(target):
+        if IMutableFileNode.providedBy(target) and not target.is_readonly():
             overwrite = T.form(action=".", method="post",
                                enctype="multipart/form-data")[
                 T.fieldset[