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

Ft rest api user creation 144208785 #10

Open
wants to merge 10 commits into
base: deploy
Choose a base branch
from

Conversation

Ahmedsebit
Copy link
Contributor

What does this PR do?

Allow new users to be created via the API.

Description of Task to be completed?

It should be possible to create new users via the API. External apps might need to register accounts on behalf of their users without having to send them over to the wger instance. A workflow like this is suggested:
Apps register as a regular user to get an API key
By default, users aren't allowed to create new accounts over the API, this has to be explicitly allowed
Users created with this key are marked somehow so it is later possible to identify them, you should probably think about adding a new OneToOne table to the user table "metadata" or such.
Simple idea for a basic protection against being spammed to death with new users:
REST API consumers that want to create users need a special right that has to be given on demand.
Users generated could have a special flag so that it's possible to see who created them
Note that it's probably easier and faster to add a new command for this (instead of a new element in the GUI). Something like add-user-rest-api and list-user-rest-apiwould be enough

How should this be manually tested?

python manage.py create_api_user.py [username] [email] [creator_name]
python manage.py list_users_rest_api

What are the relevant pivotal tracker stories?

144208785

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 this pull request may close these issues.

2 participants