Fix: run functions as pak user
This commit is contained in:
parent
7d39cae011
commit
6a6d439aa2
1 changed files with 3 additions and 0 deletions
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue