Issue #2957
closedpulp-admin auth user create allows creation of duplicate userid
Description
pulp-admin auth user create --login bamboo --name "Bamboo CI"
User [bamboo] successfully created
pulp-admin auth user create --login bamboo --name "Bamboo CIT"
User [bamboo] successfully created
pulp-admin auth user create --login bamboo
User [bamboo] successfully created
pulp-admin auth user list
+----------------------------------------------------------------------+
Users
+----------------------------------------------------------------------+
Login: admin
Name: admin
Login: bamboo
Name: Bamboo CI
Login: bamboo
Name: bamboo
Login: bamboo
Name: Bamboo CIT
Updated by ipanova@redhat.com over 6 years ago
Usually during user creation you are prompted for password, which i do not see in the issue description.
Updated by amacdona@redhat.com over 6 years ago
This makes it look like the same login can be created for two different names. https://github.com/pulp/pulp/blob/master/server/pulp/server/db/model/__init__.py#L1163
Updated by mhrivnak over 6 years ago
@asmacdo definitely found the problem. It does appear that the uniqueness constraint is incorrect. It should be solely on the "login" field.
Updated by ttereshc over 6 years ago
- Triaged changed from No to Yes
It would be good to test the case when there were duplicates in DB already.
Updated by bmbouter almost 5 years ago
- Status changed from NEW to CLOSED - WONTFIX
Updated by bmbouter almost 5 years ago
Pulp 2 is approaching maintenance mode, and this Pulp 2 ticket is not being actively worked on. As such, it is being closed as WONTFIX. Pulp 2 is still accepting contributions though, so if you want to contribute a fix for this ticket, please reopen or comment on it. If you don't have permissions to reopen this ticket, or you want to discuss an issue, please reach out via the developer mailing list.