Label-studio: User creation through django admin dashboard

Created on 2 Apr 2021  路  2Comments  路  Source: heartexlabs/label-studio

When i try to create users through the django admin dashboard through a superuser i'm getting a
"Something's wrong, we're on it!
Try again later

True"

Here's the docker logs:
[2021-04-02 15:26:46,281] [django.request::log_response::224] [ERROR] Internal Server Error: /user/login/
Traceback (most recent call last):
File "/usr/local/lib/python3.8/dist-packages/django/core/handlers/exception.py", line 47, in inner
response = get_response(request)
File "/usr/local/lib/python3.8/dist-packages/django/core/handlers/base.py", line 179, in _get_response
response = wrapped_callback(request, callback_args, *callback_kwargs)
File "/label-studio/label_studio/users/views.py", line 100, in user_login
org_pk = Organization.find_by_user(user).pk
File "/label-studio/label_studio/organizations/models.py", line 75, in find_by_user
raise ValueError(f'No memberships found for user {user}')

Steps to reproduce the behavior:

  1. createsuperuser through manage.py and access the admin dashboard localhost:8080/admin.
  2. Add a user through the user addition and try to login through localhost:8080/user/login
  3. Error: "Something wrong" as mentioned above

Expected behavior
Login normally as you would if you'd signed up through the main frontend signup page.

Environment (please complete the following information):

  • OS: Ubuntu 20.04 (Docker container)
  • Label Studio Version 1.0.1
bug documentation

Most helpful comment

Yeah. I'd like to be able to have the ability to create users and manage them through the admin dashboard itself. As of now the documentation doesn't have any information on this. It'd be helpful to create users through the backend for sure.

All 2 comments

This is not intended to be done in such a way, there are a couple of other records needed to be created besides the User. I think we can all the necessary steps for user creation through django admin somewhere in the documentation, @DeStiNi10 do you think it might be helpful enough for you?

Yeah. I'd like to be able to have the ability to create users and manage them through the admin dashboard itself. As of now the documentation doesn't have any information on this. It'd be helpful to create users through the backend for sure.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

atakanokan picture atakanokan  路  3Comments

andreaferretti picture andreaferretti  路  6Comments

potipot picture potipot  路  4Comments

makseq picture makseq  路  6Comments

cverluise picture cverluise  路  3Comments