]> sipb.mit.edu Git - ikiwiki.git/blobdiff - ikiwiki.in
more work on untrusted committers
[ikiwiki.git] / ikiwiki.in
index 22addb46337724eecb2e50b2642c76f73d92e8bb..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();
@@ -190,7 +195,8 @@ sub main () { #{{{
                # do nothing
        }
        elsif ($config{test_receive}) {
-               rcs_test_receive();
+               require IkiWiki::Receive;
+               IkiWiki::Receive::test();
        }
        else {
                if ($config{rebuild}) {