mirror of
https://github.com/9001/copyparty.git
synced 2025-09-30 13:42:27 -06:00
create idp-db when necessary (#849)
This commit is contained in:
parent
a493cd6530
commit
80ca78516e
|
@ -1817,8 +1817,7 @@ class AuthSrv(object):
|
|||
self.log("\n{0}\n{1}{0}".format(t, "\n".join(slns)))
|
||||
raise
|
||||
|
||||
self.args.have_idp_hdrs = bool(self.args.idp_h_usr or self.args.idp_hm_usr)
|
||||
self.args.have_ipu_or_ipr = bool(self.args.ipu or self.args.ipr)
|
||||
derive_args(self.args)
|
||||
self.setup_auth_ord()
|
||||
|
||||
self.setup_pwhash(acct)
|
||||
|
@ -3635,6 +3634,11 @@ class AuthSrv(object):
|
|||
self.log("generated config:\n\n" + "\n".join(ret))
|
||||
|
||||
|
||||
def derive_args(args: argparse.Namespace) -> None:
|
||||
args.have_idp_hdrs = bool(args.idp_h_usr or args.idp_hm_usr)
|
||||
args.have_ipu_or_ipr = bool(args.ipu or args.ipr)
|
||||
|
||||
|
||||
def n_du_who(s: str) -> int:
|
||||
if s == "all":
|
||||
return 9
|
||||
|
|
|
@ -27,7 +27,7 @@ if True: # pylint: disable=using-constant-test
|
|||
from typing import Any, Optional, Union
|
||||
|
||||
from .__init__ import ANYWIN, EXE, MACOS, PY2, TYPE_CHECKING, E, EnvParams, unicode
|
||||
from .authsrv import BAD_CFG, AuthSrv, n_du_who, n_ver_who
|
||||
from .authsrv import BAD_CFG, AuthSrv, derive_args, n_du_who, n_ver_who
|
||||
from .bos import bos
|
||||
from .cert import ensure_cert
|
||||
from .fsutil import ramdisk_chk
|
||||
|
@ -1186,6 +1186,7 @@ class SvcHub(object):
|
|||
zi2 = zi
|
||||
al.u2sz = ",".join(zsl)
|
||||
|
||||
derive_args(al)
|
||||
return True
|
||||
|
||||
def _ipa2re(self, txt) -> Optional[re.Pattern]:
|
||||
|
|
Loading…
Reference in a new issue