Skip to content

Commit

Permalink
Item14237: Fixed incorrect parameters in throw calls
Browse files Browse the repository at this point in the history
  • Loading branch information
vrurg committed May 13, 2018
1 parent 984282a commit 3de1a4f
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions core/lib/Foswiki/Configure/Auth.pm
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,14 @@ sub checkAccess {
# (yet).
Foswiki::load_package(
"Foswiki::Contrib::JsonRpcContrib::Error");
throw Foswiki::Contrib::JsonRpcContrib::Error( -32600,
Foswiki::Contrib::JsonRpcContrib::Error->throw(
code => -32600,
text =>
'Access to configure denied by {FeatureAccess}{Configure} Setting'
);
}
else {
throw Foswiki::AccessControlException(
Foswiki::AccessControlException->throw(
mode => 'VIEW',
user => $app->user,
web => 'System',
Expand All @@ -78,11 +80,13 @@ sub checkAccess {
if ($json) {
Foswiki::load_package(
"Foswiki::Contrib::JsonRpcContrib::Error");
throw Foswiki::Contrib::JsonRpcContrib::Error( -32600,
'Access to configure denied for non-admin users' );
Foswiki::Contrib::JsonRpcContrib::Error->throw(
code => -32600,
text => 'Access to configure denied for non-admin users'
);
}
else {
throw Foswiki::AccessControlException(
Foswiki::AccessControlException->throw(
mode => 'VIEW',
user => $app->user,
web => 'System',
Expand Down

0 comments on commit 3de1a4f

Please sign in to comment.