don't provide the "overwrite" button if the file is readonly to you

This commit is contained in:
Zooko O'Whielacronx 2007-11-10 16:07:05 -07:00
parent 85b972a4c3
commit 35aea346d3

View File

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