we will have a cron job executing this new endpoint daily.
There is a new prop in edaDB apidbtuning.datasetproperty:
"daysForApproval" X
for each study, sometimes it will be empty.
In apidbtuning.datasetproperty you will extract all protected studies (dataset_id) based on prop "studyAccess" = protected. .
2.become user eupathdb@gmail.com 1926010
For each protected study check in acctdb studyaccess.end_user for a pending request: a row where approval_status = 1
if today - "start_date" > X => update approval_status 1-> 0
the patch request writes in studyaccess.end_user_history where we keep track of who made the update:
HISTORY_CAUSE_USER.. let 's use eupathdb@gmail.com 1926010
we want to send email to user , providers and us when we do an update. The user email is in acctdb useraccounts.accounts. The providers emails (and ours) are in props: "requestEmail" and "requestEmailBcc".
we will have a cron job executing this new endpoint daily.
There is a new prop in edaDB apidbtuning.datasetproperty: "daysForApproval" X for each study, sometimes it will be empty.