
    	]j                     0    d dl mZ d dlmZ dededefdZy)    )create_organization)Userapi_tokens_enabledlegacy_api_tokens_enabledreturnc                     t         j                  j                  d|  d| d      }t        d|  d| |      }| |j                  _        ||j                  _        |j                  j                          ||_        |j                          |S )zGCreate a user with specified token auth settings in their organization.
test_user__z@example.com)emailz	Test Org  )title
created_by)	r   objectscreater   jwtr   r   saveactive_organization)r   r   userorgs       K/root/env/lib/python3.12/site-packages/label_studio/tests/jwt_auth/utils.pycreate_user_with_token_settingsr      s    <<z2D1EQG`Faam%noD
i0B/C1E^D_$`mq
rC!3CGG(ACGG%GGLLN"DIIKK    N)organizations.functionsr   users.modelsr   boolr    r   r   <module>r      s'    7 	 	Y] 	bf 	r   