Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Add config options to initialize admin user on first run without prompting #1245

Merged
merged 5 commits into from
Oct 18, 2023

Conversation

benmuth
Copy link
Contributor

@benmuth benmuth commented Oct 14, 2023

Summary

This adds the option to create an admin user on initialization without prompting. The configuration options ARCHIVEBOX_USERNAME and ARCHIVEBOX_PASSWORD are only checked on first initialization (if there's no index.sqlite3 file). The admin user is only created if both options are present.

I'm not sure if there are some other use cases that exist that are not covered by this implementation, please let me know if so.

Related issues

#734

Changes these areas

  • Bugfixes
  • Feature behavior
  • Command line interface
  • Configuration options
  • Internal architecture
  • Snapshot data layout on disk

@benmuth benmuth changed the title Add config options to add admin user on first run Add config options to initialize admin user on first run without prompting Oct 14, 2023
@benmuth benmuth marked this pull request as ready for review October 14, 2023 21:42
@pirate
Copy link
Member

pirate commented Oct 16, 2023

Looks good! Two small changes:

  1. Let's change it to ADMIN_USERNAME and ADMIN_PASSWORD
  2. Can you check if a user with the ADMIN_USERNAME already exists and skip creating it in that case

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants