mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-11-29 08:25:10 +00:00
snapshots: Fix for permissions issue when updating configuration
- Change `configure` command to `set-config` for consistency with `get-config` - Run `set-config` as superuser Fixes freedombox-team/plinth#1290 Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com> Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
1 parent
41641491bb
commit
8416c0831d
2 files changed
+3
-6
No files matched your search
@@ -19,7 +19,6 @@ Views for snapshot module.
|
||||
"""
|
||||
|
||||
import json
|
||||
import subprocess
|
||||
|
||||
from django.contrib import messages
|
||||
from django.shortcuts import redirect
|
||||
@@ -109,10 +108,8 @@ def update_configuration(request, old_status, new_status):
|
||||
('number_min_age', 'NUMBER_MIN_AGE={}'),
|
||||
]))
|
||||
|
||||
command = ['snapper', 'set-config'] + list(config)
|
||||
|
||||
try:
|
||||
subprocess.run(command, check=True)
|
||||
actions.superuser_run('snapshot', ['set-config', " ".join(config)])
|
||||
|
||||
messages.success(request, _('Storage snapshots configuration updated'))
|
||||
except ActionError as exception:
|
||||
|
||||
Reference in new issue
Block a user