summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
dbf2374)
canedit should fail first as it's a less expensive and harder to pass test
# The editpage code has already checked that
# $form->field('page') is valid.
$filename="XXX/$filename";
# The editpage code has already checked that
# $form->field('page') is valid.
$filename="XXX/$filename";
+
+ # Also check that the user is allowed to edit it by other
+ # policies.
+ IkiWiki::check_canedit($filename, $q, $params{session}, 1);
# Use a pagespec to test that the attachment is valid.
if (exists $config{valid_attachments} &&
# Use a pagespec to test that the attachment is valid.
if (exists $config{valid_attachments} &&
- # 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});
# Move the attachment into place.
# Try to use a fast rename; fall back to copying.
prep_writefile($filename, $config{srcdir});