fix: from review

This commit is contained in:
dettlaff 2024-06-19 15:20:31 +04:00 committed by Inex Code
parent 82a0b557e1
commit 416a0a8725
3 changed files with 9 additions and 7 deletions

View file

@ -3,14 +3,14 @@ from selfprivacy_api.migrations.migration import Migration
from selfprivacy_api.utils import ReadUserData, WriteUserData
class UpdateServicesFlakeList(Migration):
"""Check if all required services are in the flake list"""
class AddRoundcubeToUserdata(Migration):
"""Add Roundcube to userdata.json if it does not exist"""
def get_migration_name(self):
return "update_services_flake_list"
return "add_roundcube_to_userdata"
def get_migration_description(self):
return "Check if all required services are in the flake list"
return "Add Roundcube to userdata.json if it does not exist"
def is_migration_needed(self):
with ReadUserData() as data:
@ -20,6 +20,5 @@ class UpdateServicesFlakeList(Migration):
def migrate(self):
with WriteUserData() as data:
data["modules"]["roundcube"] = {
"enable": True,
"subdomain": "roundcube",
}

View file

@ -25,7 +25,6 @@ class UpdateServicesFlakeList(Migration):
return "Check if all required services are in the flake list"
def is_migration_needed(self):
# this do not delete custom links for testing
for key, value in manager.services.items():
if key not in CORRECT_SERVICES_LIST:
return True

View file

@ -44,9 +44,13 @@ class Roundcube(Service):
def is_required() -> bool:
return False
@staticmethod
def can_be_backed_up() -> bool:
return False
@staticmethod
def get_backup_description() -> str:
return "Secrets that are used to encrypt the communication."
return "Nothing to backup."
@staticmethod
def get_status() -> ServiceStatus: