Browse Source
Handle validation result in time series read queries
pull/16308/head
Viacheslav Klimov
1 month ago
Failed to extract signature
1 changed files with
4 additions and
0 deletions
-
application/src/main/java/org/thingsboard/server/service/telemetry/DefaultTbTelemetryService.java
|
|
|
@ -91,6 +91,10 @@ public class DefaultTbTelemetryService implements TbTelemetryService { |
|
|
|
accessValidator.validate(currentUser, Operation.READ_TELEMETRY, entityId, new FutureCallback<>() { |
|
|
|
@Override |
|
|
|
public void onSuccess(ValidationResult validationResult) { |
|
|
|
if (validationResult.getResultCode() != ValidationResultCode.OK) { |
|
|
|
onFailure(ValidationCallback.getException(validationResult)); |
|
|
|
return; |
|
|
|
} |
|
|
|
try { |
|
|
|
Futures.addCallback(tsService.findAllByQueries(currentUser.getTenantId(), entityId, new ArrayList<>(queries)), new FutureCallback<>() { |
|
|
|
@Override |
|
|
|
|