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

When creating sysadmin user flow aborts, the user is still created #8078

Open
andrewtpham opened this issue Feb 15, 2024 · 3 comments
Open

Comments

@andrewtpham
Copy link

CKAN version

CKAN version: 2.10.3
Python version: 3.9.6
OS: Mac

Describe the bug

When creating a sysadmin user for an install of CKAN on my local machine and it fails, the user is still created in the user table.

Steps to reproduce

Steps to reproduce the behavior:

  1. With the virtual environment activated, run ckan sysadmin add <admin>
  2. There is a prompt to enter an email, enter any email
  3. There is a prompt to enter a password, enter in a password that does NOT meet the criteria (longer than 8 characters)
  4. Confirm the password
  5. There is a prompt with the password criteria which needs to be more than 8 characters and that the user flow has been aborted.
  6. Now re-run ckan sysadmin add <admin>
  7. Enter an email
  8. Enter a valid password with at least 8 characters
  9. Confirm the password
  10. Then you should see a note that says:
None - {'name': ['That login name is not available.']}
Aborted!
  1. Once you create the a sysadmin user, run the app then go to the admin panel and view users to confirm that the first user you tried to create was created even though the user creation flow was aborted.

Expected behavior

If the user creation flow was aborted, a user should not be created.

Additional details

This is a screenshot of the 2nd time attempting to create a user with the same name which illustrated that the first time it was created even though the user creation flow was aborted.
image

@Nisha1293
Copy link

Hi @andrewtpham and @wardi
I am working on this issue.

@Nisha1293
Copy link

Hi @andrewtpham ,
When i tried the same steps on my machine window, it is working fine.
Is it Os specific issue.? Could you please provide more information, if any?

@TomeCirun
Copy link
Contributor

TomeCirun commented Feb 29, 2024

I've tested this on CKAN2.10.3 and on master, works on both @wardi

image

image

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

No branches or pull requests

4 participants