Skip to content

Server CLI: user management

Agate requested to merge cli into develop

it was asked recently via https://monsterpit.net/@multiple_creatures/103134500987250281, and it was due anyway to make automation easier, so I took the morning to work on this.

This makes a new python.manage.py fw command namespace available on the server. I've used click as the CLI library, because it's really easy to use and allow quite complex operations (like having command namespaces or reading option values from env vars). Whitin this namespace, 3 commands are available:

  • python manage.py fw users create: create a user (and not only an admin users, as python manage.py createsuperuser does)
  • python manage.py fw users set: update attributes such as password, permissions, active status or upload quota on one or more users
  • python manage.py fw users rm: remove one or more user accounts

The MR also includes:

cc @funkwhale/reviewers-python @funkwhale/reviewers-sysadmin @Sporiff (for docs)

Edited by Agate

Merge request reports