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

User:Assign Groups & user:assign Roles creates duplicates #11256

Closed
visverslagen opened this issue Dec 16, 2024 · 1 comment · Fixed by #11270
Closed

User:Assign Groups & user:assign Roles creates duplicates #11256

visverslagen opened this issue Dec 16, 2024 · 1 comment · Fixed by #11270

Comments

@visverslagen
Copy link

visverslagen commented Dec 16, 2024

Bug description

When going to CP -> Users and then click on the 3 dots at the end of a user line, click assign groups, click 1 group and save. go back to users overview and click the 3 dots again, click assign groups again and click the same group and save again. go to users overview and click edit. you will see the same group assigned twice to the user. The same applies when assigning a role. This could be fixed by showing current groups / roles when assigning them (same as when edditing a user).

How to reproduce

When going to CP -> Users and then click on the 3 dots at the end of a user line, click assign groups, click 1 group and save. go back to users overview and click the 3 dots again, click assign groups again and click the same group and save again. go to users overview and click edit. you will see the same group assigned twice to the user. The same applies when assigning a role. This could be fixed by showing current groups / roles when assigning them (same as when edditing a user).

Logs

[2024-12-16 06:47:42] local.INFO: Jelle ('d1bdb8cc-940a-47b0-9fa0-12f1ba8006f1') created/edited user group 'User group 2' (handle: 'user_group2')  
[2024-12-16 06:48:10] local.INFO: Jelle ('d1bdb8cc-940a-47b0-9fa0-12f1ba8006f1') created/edited user 'Jelle'
[2024-12-16 06:49:15] local.INFO: Jelle ('d1bdb8cc-940a-47b0-9fa0-12f1ba8006f1') created/edited user 'Jelle'

my user .yml

name: Jelle
super: true
groups:
  - user_group1
  - user_group2
  - user_group1
  - user_group1
  - user_group2
roles:
  - role_1
  - role_1
  - role_1

Environment

local environment HERD php 8.3 node 22

Installation

Fresh statamic/statamic site via CLI

Additional details

statamic pro fresh install locally

@visverslagen
Copy link
Author

I appreciate the work you have done to fix this :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant