]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blobdiff - ikiwiki.in
more work on untrusted committers
[git.ikiwiki.info.git] / ikiwiki.in
index fd21b49112527343c6f63e9eae88f7506a9eb134..60663bc89cdf8e0283da54a4d7f0014f627582dd 100755 (executable)
@@ -119,10 +119,15 @@ sub getconfig () { #{{{
                }
                delete $ENV{WRAPPED_OPTIONS};
 
-               # optimisation for no-op post_commit 
                if ($config{post_commit} && ! commit_hook_enabled()) {
+                       # optimisation for no-op post_commit 
                        exit 0;
                }
+               elsif ($config{test_receive}) {
+                       # quick success if the user is trusted
+                       require IkiWiki::Receive;
+                       exit 0 if IkiWiki::Receive::trusted();
+               }
 
                loadplugins();
                checkconfig();
@@ -189,6 +194,10 @@ sub main () { #{{{
        elsif ($config{post_commit} && ! commit_hook_enabled()) {
                # do nothing
        }
+       elsif ($config{test_receive}) {
+               require IkiWiki::Receive;
+               IkiWiki::Receive::test();
+       }
        else {
                if ($config{rebuild}) {
                        debug(gettext("rebuilding wiki.."));