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

[Administration] | Site-wide context - Settings Wizard, editing user roles in a context may remove roles from other contexts #11078

Open
1 of 4 tasks
Tribunal33 opened this issue Mar 12, 2025 · 3 comments
Assignees
Labels
Bug:2:Major A bug found in common paths that reduces functionality for a large number of users
Milestone

Comments

@Tribunal33
Copy link
Contributor

Tribunal33 commented Mar 12, 2025

Valid Title

  • I have updated the title to accurately reflect the bug description

Description

The original bug found "When I assign a role to an account (even the admin) in a second journal this account looses its role(s?) in the first journal. E.g. by assigning the Journal Manger role to the admin account in journal B the admin account looses its Journal Manager role in journal A."

I have investigated and was able to reproduce this. I was not able to reproduce in my 3.4 OJS VM. This bug will not be seen if two users are created in each of the journals with different usersnames. The user will need to be registered in one journal and referenced in the other journal. There are a few ways this can be accomplished:

  • Creating multiple Journals/Presses (This will typically create the admin account by default)
  • Using the Administration > settings Wizard > Users > Search > Include users with no roles checkbox > edit user
  • Using the Invite to a role in one journal referencing existing user from another journal

Steps to Reproduce

Scenario 1 : using the admin account default

  1. Login with Admin account
  2. Navigate to Administration > Hosted Journals > Create Journal
  3. Finish creating a new Journal (ex Journal B)
  4. Navigate to Administration > Hosted journals > Options Triangle from one Journal > Settings Wizard > Users tab
  5. For the admin account select the options triangle and Edit User
  6. Add a new role and Select OK
  7. Navigate to Administration > Hosted Journals > Options Triangle from other Journal > Settings Wizard > Users tab
  8. Observe the user roles for the admin account

Scenario 2: Using the existing user update roles
Preconditions: Must have two or more journals and a user created that only exists in one of those journals

  1. Login with Admin account
  2. Navigate to Administration > Hosted journals > Options Triangle from one Journal without existing user
  3. Continue to select Settings Wizard > Users tab > Search > toggle checkbox to included users with no roles
  4. Select this filters search
  5. Find this user that had no roles in this journal previously
  6. For this user account select the options triangle and Edit User
  7. Add a new role and Select OK
  8. Navigate to Administration > Hosted Journals > Options Triangle from other Journal > Settings Wizard > Users tab
  9. Observe the user roles for the existing account

Expected Result

The roles should be distinct between the two journals. Each journal's user entry should be able to have different roles without affecting the other journal

Actual Result

Once you update a role in one journal it erases all roles in the other.

Environment Details

No response

Application Version

OJS, OMP Stable-3_5_0

Logs

No response

Additional Information

Updating Journal A removes roles from Journal B
Image


PRs:
stable-3_5_0:

main:

@Tribunal33 Tribunal33 added the Bug:2:Major A bug found in common paths that reduces functionality for a large number of users label Mar 12, 2025
@Tribunal33 Tribunal33 added this to the 3.5 Internal milestone Mar 12, 2025
@asmecher asmecher changed the title [Administration] | Site-wide context - Settings Wizard, adding user roles to the shared account are removing roles from twin account [Administration] | Site-wide context - Settings Wizard, editing user roles in a context may remove roles from other contexts Mar 12, 2025
@asmecher asmecher assigned bozana and unassigned asmecher Mar 12, 2025
@asmecher
Copy link
Member

@bozana, this appears to be caused by changes to UserForm, introduced in 459aac9. That code doesn't consider that the user may be active in several journals, but the form will only ever see the current journal's enrolments. Therefore enrolments in other journals will get removed when the form is saved. Can you take a look?

@bozana
Copy link
Collaborator

bozana commented Mar 13, 2025

@asmecher, could you please review the fix above?
Thanks a lot!

@asmecher
Copy link
Member

I reviewed and force-merged to stable-3_5_0 -- thanks, @bozana. Can you forward-port to main (and merge/update submodules as needed)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug:2:Major A bug found in common paths that reduces functionality for a large number of users
Projects
None yet
Development

No branches or pull requests

3 participants