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

Do not display bulk actions associated with rights that the users do not have #12015

Closed
11 tasks done
adinaflorea9 opened this issue May 30, 2023 · 2 comments · Fixed by #13018 or #13046
Closed
11 tasks done

Do not display bulk actions associated with rights that the users do not have #12015

adinaflorea9 opened this issue May 30, 2023 · 2 comments · Fixed by #13018 or #13046
Assignees
Labels
change A change of an existing feature (ticket type) general Not directly concerned with any particular functional section of the application qa-verified Issue has been tested and verified by QA ready Issue fulfills the definition of ready and can be implemented users

Comments

@adinaflorea9
Copy link

adinaflorea9 commented May 30, 2023

Problem Description

Currently, the expected behavior in regards to the display of the bulk actions associated with rights that the logged in users do not have is met only for the 'Messages' directory - bulk action 'Delete', 'Upload quarantine documents' in each directory, and the 'Delete/restore', 'Archive/De-archive' in the 'Events' directory and 'Event participants' tabs where if the respective rights are missing the associated actions are not displayed in the 'Bulk actions' dropdowns.

There are 2 perspectives that need to be addressed:

  1. where the actions associated with the missing rights are shown in the dropdown and the actions are successful:
    - Cases directory - edit bulk actions:
    If the user has UserRight.CASE_EDIT the bulk actions dropdown will contain the "Edit" functionality but the actions inside the bulk edit popup should be limited based on the specific case edit rights ( same logic as there is is place when editing a case in single mode). When the user does not have a specific edit right, the checkbox should be read only.
    The following rights are necessary for the specific edit actions from "Edit cases" popup window:
  • "Change Disease" -> CASE_CHANGE_DISEASE
  • "Change case classification" -> CASE_CLASSIFY
  • "Change investigation status" -> CASE_INVESTIGATE
  • "Change case outcome" -> CASE_CLASSIFY
  • "Change facility" -> CASE_TRANSFER

Note: There is no need to set the following checkboxes to readOnly based on rights:

  • "Change case surveillance officer" (will depend on CASE_EDIT right)
  • "Change share with reporting tool"

image

  1. where the actions associated with the missing rights are shown and an error message stops the user from completing the action:
  • Cases directory - bulk actions: edit (change surveillance officer or all edit actions if the full set of edit existing cases rights are missing), link event (link event requires EVENT_CREATE and EVENTPARTICIPANT_CREATE rights + EVENT_SURVEILLANCE feature configuration);
  • Contacts directory -link to event (requires EVENT_CREATE and EVENTPARTICIPANT_CREATE rights + EVENT_SURVEILLANCE feature configuration);
  • Event participants tab - bulk actions: create contacts (requires CONTACT_CREATE right);
  • Samples directory - bulk actions: delete/restore (requires SAMPLE_DELETE right);

Proposed Change

The bulk actions displayed for the user should all be consistently displayed based on the rights of the user logged in, as we currently do for part of the delete/restore, archive/de-archive, and upload documents actions that are not displayed in some bulk actions dropdowns when the respective rights are missing.

Added Value/Benefit

Consistency in regards to the display based on the user's rights and the display of less error messages caused by displaying actions associated with missing rights.

Acceptance Criteria

  • in the dropdown of 'Bulk actions' the actions displayed should be based on the rights of the user - i.e. if a certain right is missing the action associated with it should not be displayed;
  • for the edit actions that contain multiple 'sub-actions' - if only some if those sub-actions are missing, the 'Edit' action should still be displayed and contain only those sub-actions that the user has rights for ( when the user does not have the proper right, the checkboxes should be readonly in the "Edit cases" popup)

Directories to be covered:

  • cases
  • contacts
  • event participants
  • samples

Implementation Details

No response

Mockups

No response

Additional Information

An extensive explanation on which actions are dependent on which rights was written and can be provided to help with the development of the issue.

The display of the bulk edit mode across directories where it is implemented will be addressed by #11881

@adinaflorea9 adinaflorea9 added users change A change of an existing feature (ticket type) general Not directly concerned with any particular functional section of the application needs-refinement Refinement or further specification required labels May 30, 2023
@adinaflorea9 adinaflorea9 self-assigned this May 30, 2023
@adinaflorea9 adinaflorea9 added ready Issue fulfills the definition of ready and can be implemented and removed needs-refinement Refinement or further specification required labels Jun 11, 2023
@adinaflorea9 adinaflorea9 removed their assignment Jun 11, 2023
@carina29 carina29 self-assigned this Feb 22, 2024
carina29 added a commit that referenced this issue Mar 1, 2024
carina29 added a commit that referenced this issue Mar 1, 2024
carina29 added a commit that referenced this issue Mar 1, 2024
…tureEnabled() and UserProvider.getCurrent().hasUserRight() occurrences with methods from UiUtil.java
carina29 added a commit that referenced this issue Mar 1, 2024
carina29 added a commit that referenced this issue Mar 1, 2024
leventegal-she added a commit that referenced this issue Mar 4, 2024
…y_actions_associated_with_rights_that_the_users_do_not_have

#12015 - Do not display bulk actions if the necessary rigths are missing
@richardbartha richardbartha added the qa-verified Issue has been tested and verified by QA label Mar 13, 2024
@richardbartha
Copy link
Contributor

Tested on local env version 1.95.1

@carina29
Copy link
Contributor

I'm reopening this ticket because I've found a bug related to a requirement from 2).

It was not specified (therefore implemented) that in case of Samples, the problem appears for Human Samples for bulk actions: delete/restore (requires SAMPLE_DELETE right) and for Environment Samples (requires ENVIRONMENT_SAMPLE_DELETE).

For Human Samples the problem was fixed but for Environment Samples is still present ( Delete appears in bulk actions when the user does not have delete environment samples right).

daveotengo pushed a commit to ePareto-Information-System/SORMAS-Project that referenced this issue Mar 19, 2024
daveotengo pushed a commit to ePareto-Information-System/SORMAS-Project that referenced this issue Mar 19, 2024
daveotengo pushed a commit to ePareto-Information-System/SORMAS-Project that referenced this issue Mar 19, 2024
daveotengo pushed a commit to ePareto-Information-System/SORMAS-Project that referenced this issue Mar 19, 2024
daveotengo pushed a commit to ePareto-Information-System/SORMAS-Project that referenced this issue Mar 19, 2024
…ionFacade().isFeatureEnabled() and UserProvider.getCurrent().hasUserRight() occurrences with methods from UiUtil.java
daveotengo pushed a commit to ePareto-Information-System/SORMAS-Project that referenced this issue Mar 19, 2024
daveotengo pushed a commit to ePareto-Information-System/SORMAS-Project that referenced this issue Mar 19, 2024
daveotengo pushed a commit to ePareto-Information-System/SORMAS-Project that referenced this issue Mar 19, 2024
daveotengo pushed a commit to ePareto-Information-System/SORMAS-Project that referenced this issue Mar 19, 2024
sergiupacurariu added a commit that referenced this issue Mar 26, 2024
…y_delete_bulk_action_without_delete_environment_samples_right

#12015 - Delete should not appear in bulk actions if the user is miss…
@carina29 carina29 added qa-verified Issue has been tested and verified by QA and removed qa-verified Issue has been tested and verified by QA labels Mar 26, 2024
@richardbartha richardbartha added this to the Sprint 0 - 1.96.0 milestone May 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
change A change of an existing feature (ticket type) general Not directly concerned with any particular functional section of the application qa-verified Issue has been tested and verified by QA ready Issue fulfills the definition of ready and can be implemented users
Projects
None yet
3 participants