Status of SubscriptionRequest is not considered when Notifications for LogisticsObjet Update is setup
After a LogisticsObject has been created or updated, Notifications are sent out.
This also includes collecting all subscriptions that are interested in this data update.
However, it seems that the status of SubscriptionRequest (as wrapper of a Subscription) is not checked for being RequestStatus.REQUEST_ACCEPTED
.
As a result, Notifications are sent to requested subscribers even if SubscriptionRequests are rejected ore revoked.
Problem:
SubscriptionRepository#getAcceptedSubscriptions does not check https://onerecord.iata.org/ns/api#hasRequestStatus
== https://onerecord.iata.org/ns/api#REQUEST_ACCEPTED
To reproduce:
Precondition: Ensure that ActionRequestClient does not approve ActionRequest, e.g. by increasing action-request.evaluation.interval=60m
-
POST /subscription
As non-dataholder request subscription with"api:hasTopicType": { "@id": "api:LOGISTICS_OBJECT_IDENTIFIER" }
and"api:hasTopic": ...
-
POST /logistics-objects
Create LogisticsObject