summaryrefslogtreecommitdiff
path: root/IkiWiki/Plugin/signinedit.pm
blob: 08932e2f6bb69a13f064ea8a17796a241862a5f8 (plain)
  1. #!/usr/bin/perl
  2. package IkiWiki::Plugin::signinedit;
  3. use warnings;
  4. use strict;
  5. use IkiWiki 2.00;
  6. sub import { #{{{
  7. hook(type => "canedit", id => "signinedit", call => \&canedit,
  8. last => 1);
  9. } # }}}
  10. sub canedit ($$$) { #{{{
  11. my $page=shift;
  12. my $cgi=shift;
  13. my $session=shift;
  14. # Have the user sign in, if they are not already. This is why the
  15. # hook runs last, so that any hooks that don't need the user to
  16. # signin can override this.
  17. IkiWiki::needsignin($cgi, $session);
  18. return "";
  19. } #}}}
  20. 1