Skip to content

Add PermitAll and DenyAll AuthorizationManager instances #16590

Closed
@jzheaux

Description

@jzheaux

It would be nice to have an AuthorizationManager that returned a static response:

public final class SingleResultAuthorizationManager<C> implements AuthorizationManager<C> {
    private final AuthorizationResult result;

    // ...

    public static <C> SingleResultAuthorizationManager<C> permitAll() { ... }

    public static <C> SingleResultAuthorizationManager<C> denyAll() { ... }
}

This ticket would also look for and replace code that creates a permit-all or deny-all lambda like in AuthorizeHttpRequestsConfigurer#AuthorizeUrl and RequestMatcherDelegatingAuthorizationManager#AuthorizeUrl.

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions