pkp / pkp-lib

The library used by PKP's applications OJS, OMP and OPS, open source software for scholarly publishing.
https://pkp.sfu.ca
GNU General Public License v3.0
307 stars 447 forks source link

OJS - 3.5 Removing of user role results in an error and role is not permanently removed. #10589

Closed Tribunal33 closed 1 week ago

Tribunal33 commented 2 weeks ago

Describe the bug When a user has multiple roles and we attempt to remove a role, I’m getting an error message pop up and although the user UI appears to have removed the user they have not been removed officially. In the network developer tools i'm seeing this error message "error": "The route publicknowledge\/api\/v1\/users\/2\/role\/8 could not be found. Image

Prereqs Need to be using a journal manager or any user that can invite users. Need to have another user with more than one role. You can add a role first to an existing user or already have a user with multiple roles If you wish to see the network tab error then open up the dev tools -> network tab

Steps To Reproduce

  1. Login to the account that can invite users
  2. Select Settings from side navigation
  3. Select Users & Roles
  4. From the Users tab select Invite to a role button
  5. Enter the user that has multiple roles into the username field
  6. Select Search User button
  7. Select Remove Role button Under the role table find the role you wish to remove
  8. Select Yes from the Remove Role popup window

Actual result Error message pop up, Network tab will display this "error": "The route publicknowledge\/api\/v1\/users\/2\/role\/8 could not be found but UI updates that the role was removed.

Expected Results A success message pop up without any network errors and the UI updates that the role has been removed.

What application are you using? OJS v3.5

Additional information Additionally after the error occurs the UI updated that the role had been remove but if you navigated back to the invitation window the role for that user is still showing. Bug from #9658

Tribunal33 commented 1 week ago

This issue has been fixed. Tested locally by using the updated submodule branches from @ipula and @withanage .