]> sipb.mit.edu Git - ikiwiki.git/blobdiff - doc/todo/cgi_hooks_get_session_objects.mdwn
changelog
[ikiwiki.git] / doc / todo / cgi_hooks_get_session_objects.mdwn
index 85d37fe2bbc3cecd40a11e1f09026cc753820d25..edb9aba254721f0aeea7356da9f1f97025795893 100644 (file)
@@ -1,44 +1,5 @@
-This patch gives CGI hooks access to the session object. This enables more 
-complicated CGI plugins (that require access control, for example). --Ethan
+How about a hook to allow CGI objects to insist on authenticated users 
+only? I think "authcgi" would be a good name. --Ethan
 
-<pre>
-Index: IkiWiki/CGI.pm
-===================================================================
---- IkiWiki/CGI.pm     (revision 3946)
-+++ IkiWiki/CGI.pm     (working copy)
-@@ -636,7 +636,7 @@
-       
-               $q=CGI->new;
-       
--              run_hooks(cgi => sub { shift->($q) });
-+              run_hooks(cgi => sub { shift->($q, $session) });
-       }
-       my $do=$q->param('do');
-Index: IkiWiki/Plugin/search.pm
-===================================================================
---- IkiWiki/Plugin/search.pm   (revision 3946)
-+++ IkiWiki/Plugin/search.pm   (working copy)
-@@ -72,7 +72,7 @@
-       estcfg();
- } #}}}
--sub cgi ($) { #{{{
-+sub cgi ($$) { #{{{
-       my $cgi=shift;
-       if (defined $cgi->param('phrase') || defined $cgi->param("navi")) {
-Index: IkiWiki/Plugin/poll.pm
-===================================================================
---- IkiWiki/Plugin/poll.pm     (revision 3946)
-+++ IkiWiki/Plugin/poll.pm     (working copy)
-@@ -74,7 +74,7 @@
-       return "<div class=poll>$ret</div>";
- } # }}}
--sub cgi ($) { #{{{
-+sub cgi ($$) { #{{{
-       my $cgi=shift;
-       if (defined $cgi->param('do') && $cgi->param('do') eq "poll") {
-               my $choice=$cgi->param('choice');
-</pre>
\ No newline at end of file
+> This is now [[done]], although I called it sessioncgi since the user may
+> or may not be authed. --[[Joey]]