Skip to content

Commit

Permalink
Item12839: flag rest handlers that don't require authentication
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.foswiki.org/trunk/SolrPlugin@17505 0b4bb1d4-4e5a-0410-9cc4-b2b747904278
  • Loading branch information
MichaelDaum authored and MichaelDaum committed Apr 4, 2014
1 parent 9d4fd08 commit 2813bd7
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions lib/Foswiki/Plugins/SolrPlugin.pm
Expand Up @@ -65,15 +65,15 @@ sub initPlugin {
my $web = $session->{webName};
my $topic = $session->{topicName};
return getSearcher($session)->restSOLRSEARCH($web, $topic);
});
}, authenticate => 0);

Foswiki::Func::registerRESTHandler('proxy', sub {
my $session = shift;

my $web = $session->{webName};
my $topic = $session->{topicName};
return getSearcher($session)->restSOLRPROXY($web, $topic);
});
}, authenticate => 0);


Foswiki::Func::registerRESTHandler('similar', sub {
Expand All @@ -82,34 +82,34 @@ sub initPlugin {
my $web = $session->{webName};
my $topic = $session->{topicName};
return getSearcher($session)->restSOLRSIMILAR($web, $topic);
});
}, authenticate => 0);

Foswiki::Func::registerRESTHandler('autocomplete', sub {
my $session = shift;

my $web = $session->{webName};
my $topic = $session->{topicName};
return getSearcher($session)->restSOLRAUTOCOMPLETE($web, $topic);
});
}, authenticate => 0);

Foswiki::Func::registerRESTHandler('autosuggest', sub {
my $session = shift;

my $web = $session->{webName};
my $topic = $session->{topicName};
return getSearcher($session)->restSOLRAUTOSUGGEST($web, $topic);
});
}, authenticate => 0);

Foswiki::Func::registerRESTHandler('webHierarchy', sub {
my $session = shift;

return getWebHierarchy($session)->restWebHierarchy(@_);
});
}, authenticate => 0);

Foswiki::Func::registerRESTHandler('optimize', sub {
my $session = shift;
return getIndexer($session)->optimize();
});
}, authenticate => 0);

Foswiki::Func::registerRESTHandler('crawl', sub {
my $session = shift;
Expand All @@ -120,7 +120,7 @@ sub initPlugin {
my $depth = $query->param("depth");

return getCrawler($session, $name)->crawl($path, $depth);
});
}, authenticate => 0);

Foswiki::Func::addToZone("script", "SOLRPLUGIN::SEARCHBOX", <<'HERE', "JQUERYPLUGIN");
<script src='%PUBURLPATH%/%SYSTEMWEB%/SolrPlugin/solr-searchbox.js'></script>
Expand Down

0 comments on commit 2813bd7

Please sign in to comment.