summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoey Hess <joey@kodama.kitenet.net>2008-07-01 13:20:42 -0400
committerJoey Hess <joey@kodama.kitenet.net>2008-07-01 13:20:42 -0400
commitdbf23748dd3bda9f0c520e302876ef280d71f199 (patch)
treef24b8aab4ce3d6f0829f172dd50b64b2b0ee2c0c
parentcec45b69da7a12ff4c8e78a47d887d273d480251 (diff)
call check_canedit
Needed to prevent uploads of locked pages as attachments.
-rw-r--r--IkiWiki/Plugin/attachment.pm4
1 files changed, 4 insertions, 0 deletions
diff --git a/IkiWiki/Plugin/attachment.pm b/IkiWiki/Plugin/attachment.pm
index 82fcdbb74..8babe2be2 100644
--- a/IkiWiki/Plugin/attachment.pm
+++ b/IkiWiki/Plugin/attachment.pm
@@ -65,6 +65,10 @@ sub formbuilder (@) { #{{{
}
}
+ # Also check that the user is allowed to edit it by other
+ # policies.
+ IkiWiki::check_canedit($filename, $q, $params{session}, 1);
+
# Move the attachment into place.
# Try to use a fast rename; fall back to copying.
prep_writefile($filename, $config{srcdir});