Skip to content

Commit

Permalink
Item12839: Update rest authority for EditRowPlugin
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.foswiki.org/trunk@17728 0b4bb1d4-4e5a-0410-9cc4-b2b747904278
  • Loading branch information
GeorgeClark authored and GeorgeClark committed May 29, 2014
1 parent c40f57e commit 8a9c713
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions EditRowPlugin/lib/Foswiki/Plugins/EditRowPlugin.pm
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,19 @@ our @refs;
sub initPlugin {
my ( $topic, $web, $user, $installWeb ) = @_;

Foswiki::Func::registerRESTHandler( 'get', \&get );
Foswiki::Func::registerRESTHandler(
'get', \&get,
authenticate => 0, # Checks access permissions
validate => 0, # Can't update,
http_allow => 'GET,POST',
comment => 'Retrieve table data.'
);
Foswiki::Func::registerRESTHandler(
'save', \&save,
validate => 1,
authenticate => 1,
http_allow => 'POST'
authenticate => 1, # Block save unless authenticated
validate => 1, # Check the strikeone / embedded CSRF key
http_allow => 'POST', # Restrict to POST for updates
comment => 'Save table data.'
);
@refs = ();

Expand Down

0 comments on commit 8a9c713

Please sign in to comment.