]> sipb.mit.edu Git - ikiwiki.git/commitdiff
call check_canedit
authorJoey Hess <joey@kodama.kitenet.net>
Tue, 1 Jul 2008 17:20:42 +0000 (13:20 -0400)
committerJoey Hess <joey@kodama.kitenet.net>
Tue, 1 Jul 2008 17:20:42 +0000 (13:20 -0400)
Needed to prevent uploads of locked pages as attachments.

IkiWiki/Plugin/attachment.pm

index 82fcdbb74fb95d76dd05946622f89aa4df151a57..8babe2be287067865f6253fb39fab1be590f4566 100644 (file)
@@ -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});