Skip to content

Commit

Permalink
Use a management command for initial admin user setup.
Browse files Browse the repository at this point in the history
This command is simpler than a DB shell and helps new developers get familiar
with a useful tool. I’ve used the -s switch instead of
--staff-area-administrator for ease of typing and memorability. Once familiar
with the short form, developers may not need to refer back to these docs.
  • Loading branch information
mikerkelly committed Nov 11, 2024
1 parent 7096d3f commit 6ffefe7
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions DEVELOPERS.md
Original file line number Diff line number Diff line change
Expand Up @@ -235,16 +235,7 @@ In that situation you can follow the steps below to set up your local copy of th
1. Give your user the `StaffAreaAdministrator` role by running:

```sh
> python3 manage.py shell_plus
```

and then running in the `shell_plus` shell:

```
>>> from jobserver.authorization import StaffAreaAdministrator
>>> user = User.objects.get(username="<your_username>")
>>> user.roles.append(StaffAreaAdministrator)
>>> user.save()
> python manage.py create_user <your_username> -s
```
1. Click on your avatar in the top right-hand corner of the site to access the Staff Area.
1. Create an Org, Project, and Backend in the Staff Area.
Expand Down

0 comments on commit 6ffefe7

Please sign in to comment.