Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Add support for initial admin creation #2404

Open
liam-silvatech opened this issue Aug 9, 2024 · 3 comments
Open

Add support for initial admin creation #2404

liam-silvatech opened this issue Aug 9, 2024 · 3 comments

Comments

@liam-silvatech
Copy link

🚀 Feature Request

It would be great if we can have an environment variable such as PWP__ADMIN_LOGINS that takes a comma separated list of emails. These emails at start are added to the database and emailed a registration link along with a promotion to admin.

🔈 Motivation

Using the docker container on some services such as Azure App Service does not allow for SSH or CLI access. This then disabling the ability to create admins.

🛰 Alternatives

Not sure how else we could achieve this without CLI access. But open to ideas.

📎 Additional context

Looking to run a self hosted login only with no sign-up enabled. Can't be done when there is no CLI access.

Copy link

github-actions bot commented Aug 9, 2024

Hello @liam-silvatech, thanks for contributing to the Password Pusher community! We will respond as soon as possible.

@pglombardo
Copy link
Owner

I wasn't aware SSH or CLI wasn't an option in Azure App Service...that's good to know.

Fair feature request. I'll see if I can add something like this soon.

As a temporary work-around, you could directly access the database and set the admin field to true.

UPDATE users
SET admin = 1
WHERE email = 'myemail@example.com';

Just be careful. Make sure only the accounts you want are marked as admin:

select email from users where admin = 1;

admin is a boolean column - you might have to use true instead depending on the DB type you are using.

@liam-silvatech
Copy link
Author

Thanks for the prompt reply and supporting the suggestion.

We got access to the DB to run the command as a workaround. It's up and running now perfectly.

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

2 participants