Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated code better handle malware scan errors so that endusers can b… #412

Merged
merged 2 commits into from
May 2, 2024

Conversation

tomshag
Copy link
Contributor

@tomshag tomshag commented Apr 30, 2024

…e better informed about their upload results.

#409

Description

Previously uploaded files that have Malware issues would have their final status set to "Purged".
This change will ensure that files with Malware detected will have final status "Failed", with the Failed status and the extended MalwareScan result returned when using the LegacyFileStatus request.

I've also changed the Final status for files that have completed the Broker User Story to "Purged" rather than "Deleted", to communicate that the Altinn Broker system has purged the file from its system.

Added a Unit Test that includes malware result update of file. This creates a somewhat incorrect status history as the file status will be automatically set to published before being Failed, but that should not occur outside of the Unit Tests, and status history is not returned by Legacy requests anyway.

Related Issue(s)

Verification

  • Your code builds clean without any errors or warnings
  • Manual testing done (required)
  • Relevant automated test added (if you find this hard, leave it and we'll help out)
  • All tests run green

Documentation

  • User documentation is updated with a separate linked PR in altinn-studio-docs. (if applicable)

…e better informed about their upload results.

#409
@Ceredron
Copy link
Collaborator

Ceredron commented Apr 30, 2024

Looks good!
Should do a full repository search for "delete" and determine if it should change to "purge" to make sure we update all references.
Also need to update documentation, both the OpenAPI spec here and in altinn-studio-docs.

Also dotnet format.

Copy link
Collaborator

@RagnarFatland RagnarFatland left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me!

@tomshag tomshag merged commit b5eb74b into main May 2, 2024
@tomshag tomshag deleted the Feature/409-BrokerLegacy_FileStatusForMalwareFail branch May 2, 2024 08:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants