Skip to content

Reactive PermissionEvaluator? #5046

Closed
Closed
@sp00m

Description

@sp00m

Summary

I plan to implement my own PermissionEvaluator, but the methods signatures don't allow me to use reactive types.

Actual Behavior

public class MyPermissionEvaluator implements PermissionEvaluator {

  @Override
  public boolean hasPermission(Authentication authentication, Object targetDomainObject, Object permission) {
    // db calls, so reactive return types
  }

  @Override
  public boolean hasPermission(Authentication authentication, Serializable targetId, String targetType, Object permission) {
    // db calls, so reactive return types
  }

}

Expected Behavior

public class MyPermissionEvaluator implements PermissionEvaluator {

  @Override
  public Mono<Boolean> hasPermission(Authentication authentication, Object targetDomainObject, Object permission) {
    // db calls, so reactive return types
  }

  @Override
  public Mono<Boolean> hasPermission(Authentication authentication, Serializable targetId, String targetType, Object permission) {
    // db calls, so reactive return types
  }

}

Version

5.0.2.RELEASE

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions