projects
/
ikiwiki.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cec45b6
)
call check_canedit
author
Joey Hess
<joey@kodama.kitenet.net>
Tue, 1 Jul 2008 17:20:42 +0000
(13:20 -0400)
committer
Joey 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
patch
|
blob
|
history
diff --git
a/IkiWiki/Plugin/attachment.pm
b/IkiWiki/Plugin/attachment.pm
index 82fcdbb74fb95d76dd05946622f89aa4df151a57..8babe2be287067865f6253fb39fab1be590f4566 100644
(file)
--- 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});