From 7f6599bc33b80fec4c07fa927df6cdbb27800fe2 Mon Sep 17 00:00:00 2001 From: dettlaff Date: Sat, 18 Jan 2025 22:34:46 +0400 Subject: [PATCH] fix: rename kanidm account --- selfprivacy_api/repositories/users/kanidm_user_repository.py | 4 ++-- selfprivacy_api/services/__init__.py | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/selfprivacy_api/repositories/users/kanidm_user_repository.py b/selfprivacy_api/repositories/users/kanidm_user_repository.py index 1f7ccf7..653668d 100644 --- a/selfprivacy_api/repositories/users/kanidm_user_repository.py +++ b/selfprivacy_api/repositories/users/kanidm_user_repository.py @@ -91,8 +91,8 @@ class KanidmAdminToken: "api-token", "generate", "--rw", - "selfprivacy", - "token2", + "sp.selfprivacy-api.service-account", + "kanidm_service_account_token", ], text=True, ) diff --git a/selfprivacy_api/services/__init__.py b/selfprivacy_api/services/__init__.py index 11a41f2..83927ec 100644 --- a/selfprivacy_api/services/__init__.py +++ b/selfprivacy_api/services/__init__.py @@ -6,7 +6,7 @@ import typing import subprocess import json from typing import List -from os import path +from os import listdir, path from os import makedirs from os.path import join from functools import lru_cache @@ -25,7 +25,6 @@ import selfprivacy_api.utils.network as network_utils from selfprivacy_api.services.api_icon import API_ICON from selfprivacy_api.utils import USERDATA_FILE, DKIM_DIR, SECRETS_FILE from selfprivacy_api.utils.block_devices import BlockDevices -from selfprivacy_api.utils import read_account_uri from selfprivacy_api.services.templated_service import ( SP_MODULES_DEFENITIONS_PATH, SP_SUGGESTED_MODULES_PATH,