summaryrefslogtreecommitdiff
path: root/IkiWiki/Plugin/signinedit.pm
blob: 04532f4dce6151a2d5645ce5adce91debace50f7 (plain)
  1. #!/usr/bin/perl
  2. package IkiWiki::Plugin::signinedit;
  3. use warnings;
  4. use strict;
  5. use IkiWiki;
  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