Skip to content

Commit

Permalink
Item12952: Configure crashes HTML Validation tests
Browse files Browse the repository at this point in the history
Use a literal for the rejection reason.  The tests still fail but at
least the test suite doesn't crash.
  • Loading branch information
gac410 committed Sep 5, 2014
1 parent 1edb29f commit 336f979
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
1 change: 1 addition & 0 deletions UnitTestContrib/test/unit/HTMLValidationTests.pm
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ sub loadExtraConfig {

# $this - the Test::Unit::TestCase object
$Foswiki::cfg{JQueryPlugin}{Plugins}{PopUpWindow}{Enabled} = 1;
$Foswiki::cfg{ConfigureFilter} = '^(scum)$';

$this->SUPER::loadExtraConfig( $context, @args );

Expand Down
5 changes: 2 additions & 3 deletions core/lib/Foswiki/UI/Configure.pm
Original file line number Diff line number Diff line change
Expand Up @@ -55,14 +55,13 @@ sub configure {
unless ( $session->{user} =~ m/$filter/ ) {
throw Foswiki::AccessControlException( 'VIEW',
$session->{user}, 'System', 'Configuration',
$Foswiki::Meta::reason );
'Denied by {ConfigureFilter} Setting' );
}
}
else {
unless ( Foswiki::Func::isAnAdmin() ) {
throw Foswiki::AccessControlException( 'VIEW',
$session->{user}, 'System', 'Configuration',
$Foswiki::Meta::reason );
$session->{user}, 'System', 'Configuration', 'Not an admin' );
}
}

Expand Down

0 comments on commit 336f979

Please sign in to comment.