mirror of
https://github.com/spring-projects/spring-security.git
synced 2026-03-01 00:24:46 +00:00
Revert "Mark targetDomainObject as @Nullable in PermissionEvaluator"
This reverts commit 9f1381c382515042b348078cbe53f412e39c38e1.
This commit is contained in:
parent
9f1381c382
commit
ac06067d02
@ -18,8 +18,6 @@ package org.springframework.security.access;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import org.jspecify.annotations.Nullable;
|
||||
|
||||
import org.springframework.aop.framework.AopInfrastructureBean;
|
||||
import org.springframework.security.core.Authentication;
|
||||
|
||||
@ -41,7 +39,7 @@ public interface PermissionEvaluator extends AopInfrastructureBean {
|
||||
* expression system. Not null.
|
||||
* @return true if the permission is granted, false otherwise
|
||||
*/
|
||||
boolean hasPermission(Authentication authentication, @Nullable Object targetDomainObject, Object permission);
|
||||
boolean hasPermission(Authentication authentication, Object targetDomainObject, Object permission);
|
||||
|
||||
/**
|
||||
* Alternative method for evaluating a permission where only the identifier of the
|
||||
|
||||
@ -20,7 +20,6 @@ import java.io.Serializable;
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.jspecify.annotations.Nullable;
|
||||
|
||||
import org.springframework.core.log.LogMessage;
|
||||
import org.springframework.security.access.PermissionEvaluator;
|
||||
@ -41,7 +40,7 @@ public class DenyAllPermissionEvaluator implements PermissionEvaluator {
|
||||
* @return false always
|
||||
*/
|
||||
@Override
|
||||
public boolean hasPermission(Authentication authentication, @Nullable Object target, Object permission) {
|
||||
public boolean hasPermission(Authentication authentication, Object target, Object permission) {
|
||||
this.logger.warn(LogMessage.format("Denying user %s permission '%s' on object %s", authentication.getName(),
|
||||
permission, target));
|
||||
return false;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user