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

GDPR - Enhance remove role button functionality #11037

Open
Tribunal33 opened this issue Mar 5, 2025 · 3 comments
Open

GDPR - Enhance remove role button functionality #11037

Tribunal33 opened this issue Mar 5, 2025 · 3 comments
Assignees
Labels
Enhancement:1:Minor A new feature or improvement that can be implemented in less than 3 days.
Milestone

Comments

@Tribunal33
Copy link
Contributor

Tribunal33 commented Mar 5, 2025

Description:
During our meeting we discussed how to handle the remove role button for both the new invite to a role flow and the edit existing user flow. I think the solution will be valid for both scenarios.

Steps to test the changes:

  1. Test invite user to a role, existing user
  2. Test invite user to a role, new user
  3. Test edit existing user from user table

Solution: Remove role button should always be displayed.
Scenario 1 : Invite to a role
Requirement 1 : If an existing user is invited the first row will be the already accepted roles.
Requirement 2 : A row for adding a new role will be displayed with empty fields and the Remove role button.
Requirement 3 : If the user selects remove role and it is the first role to be added then the button will clear all the fields
Requirement 4: If the Add New Role button is selected then a new row will appear and a remove role button will be displayed.
Requirement 5: If the Remove Role button is selected and it is not the first newly added role row it will be deleted from the list.

Scenario 2: Edit existing user
Requirement 1 : Existing user is invited the first row will be the already accepted roles.
Requirement 2 : No other rows are added until the user selects Add new Role button
Requirement 3 : After selecting Add New Role button a new row will be displayed with empty fields and Remove Role button
Requirement 4: If the user selects remove role and it is the first role to be added then the button will clear all the fields
Requirement 5: If the Add New Role button is selected then a new row will appear and a remove role button will be displayed.
Requirement 6: If the Remove Role button is selected and it is not the first newly added role row it will be deleted from the list.

Scenario 3: Edit existing user and remove last role associated with the user
Requirement 1: When removing the last existing role from a user this will be blocked
Requirement 2: When this role is blocked a warning message is displayed "You need to select at least one role to be associated with this user"
Requirement 3: The role will not be removed until there is at least one role associated with this user. This means that an invitation to a role does not count towards determining if the role can be removed.
What application are you using?
OJS hybrid 3.4/3.5 GDPR Craft-OA 9658 branch

Additional information
This will fix the PART 2 issue from #11020

@Tribunal33 Tribunal33 added the Enhancement:1:Minor A new feature or improvement that can be implemented in less than 3 days. label Mar 5, 2025
@Tribunal33 Tribunal33 added this to the 3.5 Internal milestone Mar 5, 2025
@withanage
Copy link
Member

@Tribunal33 this is ready for testing

@Tribunal33
Copy link
Contributor Author

This passes QA. Tests added to regression suite.

@Tribunal33
Copy link
Contributor Author

I have re-opened this issue as there was one more scenario to cover when removing the last remaining accepted role. Previously in 3.4 there would be a warning that would prevent removing the last accepted role.

Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement:1:Minor A new feature or improvement that can be implemented in less than 3 days.
Projects
None yet
Development

No branches or pull requests

2 participants