Bug #31141
openUsers can't edit their profile
Description
When a user tries to edit their profile they get an error message:
Validation failed: Taxonomy has already been taken
This does not happen to every user and it seems to be related to permissions. I, as an admin, can edit any profile without problems.
Looking at the log the the user edit request contains:
"location_ids"=>["3", "3", ""], "default_location_id"=>"", "organization_ids"=>["1", "1", ""],
as compared to when an admin performs the same operation (on the same user):
"location_ids"=>["3", ""], "default_location_id"=>"", "organization_ids"=>["1", ""],
I suspect that the duplicate 'location_ids' and 'organization_ids' are the cause of this error, but why are there duplicate values?
Files
Updated by Adam Winberg over 4 years ago
- Found in Releases 2.3.1 added
- Found in Releases deleted (
2.1.1)
Still having this problem on 2.3.1.
Any explanations?
Users that for some reason does not have an email address in Foreman cant login properly without editing their profile first to add the email. Which fails because of this issue.
Another question is why Foreman is not automatically adding the email address forwarded to it from my external authentication? When a new user logs in it is created and firstname, surname and email is populated based on what apache has forwarded, why doesnt Foreman do this for existing users as well?
Updated by Dominik Matoulek over 4 years ago
Adam Winberg wrote:
Still having this problem on 2.3.1.
Any explanations?
Users that for some reason does not have an email address in Foreman cant login properly without editing their profile first to add the email. Which fails because of this issue.
Another question is why Foreman is not automatically adding the email address forwarded to it from my external authentication? When a new user logs in it is created and firstname, surname and email is populated based on what apache has forwarded, why doesnt Foreman do this for existing users as well?
I'm trying to figure out when this happens. However, I need to know your current setup for authentication like what kind of external authentication (AD, IPA or something else?) you're using or if there is some unusual setup.
Updated by Adam Winberg over 4 years ago
I'm using mod_auth_cas for authentication in my apache vhost which sets REMOTE_USER, and then I use mod_lookup_identity to further set REMOTE_USER_EMAIL and REMOTE_USER_GROUPS. This works, I can see that these attributes are being sent to Foreman (Puma) and new users get their accounts created with correct email.
Updated by Dominik Matoulek about 4 years ago
Adam Winberg wrote:
I'm using mod_auth_cas for authentication in my apache vhost which sets REMOTE_USER, and then I use mod_lookup_identity to further set REMOTE_USER_EMAIL and REMOTE_USER_GROUPS. This works, I can see that these attributes are being sent to Foreman (Puma) and new users get their accounts created with correct email.
Could you please try it again with foreman-debug with sql logger activated? I need to understand what happen there and logs will be great asset for investigation.
Updated by Adam Winberg about 4 years ago
debug added.
I reproduced this issue by impersonating a user with missing email address and then tried to add the email address.