Fix: run functions as pak user

This commit is contained in:
L0m1g 2025-05-08 11:59:34 +02:00
parent 7d39cae011
commit 6a6d439aa2

View file

@ -17,6 +17,7 @@ from erminig.controllers.evezh.parsers.sourceforge import SourceForgeRSS
from erminig.handlers.versions import handle_new_version
from erminig.models.db import ErminigDB
from erminig.models import upstreams, versions
from erminig.core.security import run_as_user
def load_state(path):
@ -29,6 +30,7 @@ def save_state(path, state):
Path(path).write_text(json.dumps(state, indent=2))
@run_as_user("pak")
def sync_db(config_path):
config = get_config(config_path)
print(config)
@ -95,6 +97,7 @@ def get_config(path):
return resolved
@run_as_user("pak")
def check_versions(config_path, state=None):
results = []
with ErminigDB() as db: