mirror of
https://git.selfprivacy.org/SelfPrivacy/selfprivacy-rest-api.git
synced 2024-11-25 13:31:27 +00:00
fix: from review
This commit is contained in:
parent
82a0b557e1
commit
416a0a8725
|
@ -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",
|
||||
}
|
|
@ -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
|
||||
|
|
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue