pytition / Pytition

Django app for self-hosted privacy-friendly online petitions
https://pytition.org
BSD 3-Clause "New" or "Revised" License
97 stars 28 forks source link

[Admin] Enable user creation #317

Closed fsellaouti closed 3 months ago

fsellaouti commented 3 months ago

Context : We are using an instance with ALLOW_REGISTER = False. With this configuration, users cannot register and there is no way for the administrator to create an account for users (petition creators) directly from the web app.

Solution : In the settings page, if the user is superuser, add a form for user creation.

fallen commented 3 months ago

@fsellaouti This is not documented but you can use Django's official admin interface to create accounts when ALLOW_REGISTER is False.

You can browse it at https://yourinstance/admin

Does this work for you? Do you still think we need another interface? I'm not sure indeed if it's a good practice to keep admin interface available in production.

Thanks for the report!

fsellaouti commented 3 months ago

@fallen I didn't know this admin interface. It should be enough. Thanks !