diff --git a/docs/tech/security.md b/docs/tech/security.md index 9174189e958bfe3615e66fe0460aa7c5f653a6f2..aa2b9b695b0e46592785fa6cc0a10d58a6696aa6 100644 --- a/docs/tech/security.md +++ b/docs/tech/security.md @@ -40,6 +40,8 @@ but it is not necessary because ADMIN has control over every resource on the pla ## User onboarding +### Authomatically + Users can be added to the platform via a `.csv` file in the following format: ``` @@ -74,3 +76,23 @@ Admin can be created only by admin users. As a separator for the column, you can use either `,` or `;`. An example of such a file can be [downloaded](https://gitlab.fi.muni.cz/inject/inject-docs/-/raw/main/docs/tech/example_csv.csv?ref_type=heads&inline=false). + +### Manually + +Another way of adding users is manually via the console: + + - List the running Docker containers to find the **NAME** of the backend container: + ``` + docker ps + ``` + - Execute a shell session in the backend container. Replace `CONTAINERNAME` with the actual container **NAME** of the backend service: + ``` + docker exec -it CONTAINERNAME python manage.py shell + ``` + +- Create a user using the Django shell. Replace `email@test.com` and `password` with your desired user credentials.: + + ``` python + from user.models import User + User.objects.create_user(username="email@test.com", password="password") + ``` \ No newline at end of file