SORMAS-Foundation / SORMAS-Project

SORMAS (Surveillance, Outbreak Response Management and Analysis System) is an early warning and management system to fight the spread of infectious diseases.
https://sormas.org
GNU General Public License v3.0
291 stars 135 forks source link

Confirmation pop-up remains blocked #13116

Open carina29 opened 1 month ago

carina29 commented 1 month ago

Bug Description

Confirmation pop-up remains blocked when a user without VIEW_ARCHIVED_X right archives an entity.

Reproduction Steps

Confirmation pop-up should not remain blocked when a user without VIEW_ARCHIVED_X right archives an entity. In the background the archiving is with success after clicking "Yes" in the Archive confirmation pop-up but the "Problem occured" exception will appear because the normal flow after an entity is archived is to display the archived entity but this should happen only if the user has the right to view the archived entity. The problem can be reproduced for the entities mentioned in https://github.com/SORMAS-Foundation/SORMAS-Project/issues/13034 ticket.

Example for Cases entity:

  1. Log in with a user with CASE_ARCHIVE but without CASE_VIEW_ARCHIVED rights
  2. Open a case
  3. Click Archive link
  4. Confirm the archivation in the pop-up window
  5. See the displayed messages image

Expected Behavior

Affected Area(s)

Web app

SORMAS Version

1.98

Android version/Browser

Chrome

User Role(s)

National User

Server URL

No response

Additional Information

Added benefit: User friendly app which will not confuse the user that the archiving did not happen ( because it happened in the background but the pop-up remained blocked)