NCI-Agency / anet

Advisor Network
MIT License
24 stars 11 forks source link

Fix report approval by admins and when automatic #4936

Closed gjvoosten closed 1 month ago

gjvoosten commented 2 months ago

Allow admins to approve all reports. The front-end already allowed it, but the back-end refused it. Automatic report approval (after the timeout set in the dictionary) did not work for reports that had only been submitted; this is now fixed. Show "system" instead of "Unspecified" when a report was automatically published.

Closes AB#1186

User changes

Superuser changes

Admin changes

System admin changes

Checklist

gjvoosten commented 1 month ago

The front-ends suggest, to an ANET admin, that a draft report can be approved. When this approval button is pressed, the servver returns with an error:

Bad Request: Exception while fetching data (/approveReport) : This report is not pending approval

The "Approve" button should not be enabled on a draft report.

Caused by a change for AB#991 quite some time ago; fixed in an additional commit on this PR.