Skip to content

Commit

Permalink
Item9639: Interim work-around for nested try/catch problem
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.foswiki.org/trunk@11882 0b4bb1d4-4e5a-0410-9cc4-b2b747904278
  • Loading branch information
PaulHarvey authored and PaulHarvey committed Jun 10, 2011
1 parent 5c3d23e commit cf129b5
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions CommentPlugin/lib/Foswiki/Plugins/CommentPlugin.pm
Original file line number Diff line number Diff line change
Expand Up @@ -85,13 +85,15 @@ sub _restSave {

my ($meta, $text) = Foswiki::Func::readTopic($web, $topic);

# The save function does access control checking
$text = Foswiki::Plugins::CommentPlugin::Comment::save(
$text, $web, $topic);

Foswiki::Func::saveTopic($web, $topic, $meta, $text,
{ ignorepermissions => 1 });

if ($meta->haveAccess('CHANGE')) {
# The save function does access control checking
$text = Foswiki::Plugins::CommentPlugin::Comment::save(
$text, $web, $topic);

Foswiki::Func::saveTopic($web, $topic, $meta, $text);
# { ignorepermissions => 1 });
}

$response->header(-status => 200);
$response->body("$web.$topic");
} catch Foswiki::AccessControlException with {
Expand Down

0 comments on commit cf129b5

Please sign in to comment.