Skip to content

Commit

Permalink
Improve AuthorizationManager configuration error messages
Browse files Browse the repository at this point in the history
  • Loading branch information
Spikhalskiy authored and jzheaux committed Dec 5, 2024
1 parent ff7dbb4 commit 784c02a
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,12 @@ class AuthorizationFilterParser implements BeanDefinitionParser {
public BeanDefinition parse(Element element, ParserContext parserContext) {
if (!isUseExpressions(element)) {
parserContext.getReaderContext()
.error("AuthorizationManager must be used with `use-expressions=\"true\"", element);
.error("AuthorizationManager must be used with `use-expressions=\"true\"; Add `use-authorization-manager=\"false\"` or enable use of expressions in `<http>` block", element);
return null;
}
if (StringUtils.hasText(element.getAttribute(ATT_ACCESS_DECISION_MANAGER_REF))) {
parserContext.getReaderContext()
.error("AuthorizationManager cannot be used in conjunction with `access-decision-manager-ref`",
.error("AuthorizationManager cannot be used in conjunction with `access-decision-manager-ref`; either remove the reference to AccessDecisionManager or add `use-authorization-manager=\"false\"` to `<http>` block",
element);
return null;
}
Expand Down

0 comments on commit 784c02a

Please # to comment.