Fix NPE when accessing services before OPA is ready.
This commit is contained in:
parent
1a19a9b698
commit
a8842e962b
|
|
@ -1,12 +1,14 @@
|
|||
package com.appsmith.server.acl;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import lombok.ToString;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@ToString
|
||||
public class OpaResponse {
|
||||
Boolean result;
|
||||
|
||||
public boolean isSuccessful() {
|
||||
return Boolean.TRUE.equals(result);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@ public class AclFilter implements WebFilter {
|
|||
return acl;
|
||||
})
|
||||
.flatMap(acl -> {
|
||||
if (acl != null && acl.getResult()) {
|
||||
if (acl != null && acl.isSuccessful()) {
|
||||
// Acl returned true. Continue with the filter chain
|
||||
return chain.filter(exchange);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user