ices-tools-dev / esas

European Seabirds at Sea (ESAS) data model
https://esas-docs.ices.dk
Creative Commons Zero v1.0 Universal
3 stars 1 forks source link

API returns samples from restricted campaigns #132

Closed peterdesmet closed 2 years ago

peterdesmet commented 2 years ago

This is a restricted campaign: https://esas.ices.dk/api/getCampaignRecords?campaignID=19910813112

[
  {
    "tblUploadID": 232,
    "tblCampaignID": 209012,
    "dataRightsHolder": "5045",
    "country": "NL",
    "campaignID": "19910813112",
    "dataAccess": "Restricted",
    "startDate": "1991-08-13",
    "endDate": "1991-08-13",
    "notes": null
  }
]
nicolasvanermen commented 2 years ago

I don't think this has ever been talked through but besides from that I am not against being able to query for restricted data sample records... I might give some insight in the type of data (platform type, counting method, ...) which in turn may determine whether not to request data.

peterdesmet commented 2 years ago

But what do you the data owners of such data expect? I think it is clearer to communicate that only campaign info is publicly available?

nicolasvanermen commented 2 years ago

Yes that is indeed more straightforward.

peterdesmet commented 2 years ago

@cmspinto can you implement this as such (don’t return samples from restricted campaigns).

cmspinto commented 2 years ago

Fixed, thanks for the heads up. This was a bug in the getSamples for the API. https://esas.ices.dk/api/getSampleRecords?campaignID=19910813112

If the user is a manager of the Organization it can download these records using JWT authentication.