Lokasi ngalangkungan proxy:   [ UP ]  
[Ngawartoskeun bug]   [Panyetelan cookie]                
Skip to content

Docs: distinguish permitAll/denyAll fields from methods (#19728) - #20188

Open
wangkangmao wants to merge 2 commits into
spring-projects:mainfrom
wangkangmao:docs/clarify-expression-fields-19728
Open

wangkangmao wants to merge 2 commits into
spring-projects:mainfrom
wangkangmao:docs/clarify-expression-fields-19728

Conversation

@wangkangmao

Copy link
Copy Markdown

Fixes #19728

Problem

The SpEL overview in both the method-security and HTTP authorization reference pages lists permitAll and denyAll under "the most common methods", but the current source defines them as constant fields on SecurityExpressionRoot:

// core/src/main/java/org/springframework/security/access/expression/SecurityExpressionRoot.java:57,62
public final boolean permitAll = true;
public final boolean denyAll = false;

The same class also has method forms (:175, :180) that delegate to AuthorizationManagerFactory, so simply deleting the entries would lose useful information. The docs need to distinguish the field form from the method form.

Change

  • Moved permitAll and denyAll from the methods list to the fields list in both reference pages.
  • Documented that the fields are always true / false and do not retrieve the Authentication, while permitAll() / denyAll() delegate to the configured AuthorizationManager.
  • Kept the section heading "Fields and Methods" and all existing xrefs unchanged.

Verification

  • Read SecurityExpressionRoot.java:57,62,175-182 and SecurityExpressionOperations.java on the current main to confirm both field and method forms exist.
  • Confirmed both docs still contained the inaccurate list at HEAD before editing.
  • Applied replacements to the exact upstream blob bytes (LF preserved, anchors asserted unique); git diff --check clean on the local patch.
  • Documentation-only change; no Java tests affected. The Antora/asciidoctor toolchain is not installed locally, so a full docs build was not run; structural checks (section heading, xrefs, list placement) were verified against the source files.

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Nov 29, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

status: waiting-for-triage An issue we've not yet triaged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

(doc issue) permitAll/denyAll listed as "methods" in docs but are actually fields in SecurityExpressionRoot

2 participants