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

Prevent backup path edits when ENV is set #3122

Merged

Conversation

nichwall
Copy link
Contributor

@nichwall nichwall commented Jul 5, 2024

This PR prevents the backup path from being edited in the web interface if the BACKUP_PATH environment variable is set. This is done to help prevent users from thinking their backup settings are not being applied correctly if they are not looking at the debug logs on server start as mentioned here #2973 (comment).

I changed the response for a GET request to /api/backups to include an additional value of whether this field can be editable, and set this value in the server settings in the same places where the ENV variable is checked.

Tested with setting and removing the ENV variable to make sure that the field is then editable.

View with environment variable not set:
backups_no_env

View with environment variable set:
backups_env

@advplyr
Copy link
Owner

advplyr commented Jul 5, 2024

Thanks! I didn't see a reason to persist that variable in server config so I updated it to use the value returned from the API call.

@advplyr advplyr merged commit 3a2f786 into advplyr:master Jul 5, 2024
5 checks passed
@nichwall
Copy link
Contributor Author

nichwall commented Jul 5, 2024

Thanks! That makes more sense

@nichwall nichwall deleted the backup_field_prevent_edits_with_env branch July 5, 2024 21:14
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