From 1272de9de54111a0df040266ce9345fe9512bab0 Mon Sep 17 00:00:00 2001 From: ed Date: Sun, 8 Mar 2026 00:01:58 +0000 Subject: [PATCH] idp: fix groups for hybrid users; if idp-store is 2 or less, and a user is defined both in config and by idp, then config would reload for every request with groups attached --- copyparty/authsrv.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/copyparty/authsrv.py b/copyparty/authsrv.py index 503e3dd3..c959f3db 100644 --- a/copyparty/authsrv.py +++ b/copyparty/authsrv.py @@ -3312,20 +3312,22 @@ class AuthSrv(object): cur.close() db.close() + old_accs = self.idp_accs.copy() self.idp_accs.clear() self.idp_usr_gh.clear() gsep = self.args.idp_gsep + groupless = (None, [""]) n = [] for uname, gname in from_cache: if level < 3: if uname in self.idp_accs: continue - gname = "" + if old_accs.get(uname) in groupless: + gname = "" gnames = [x.strip() for x in gsep.split(gname)] gnames.sort() - # self.idp_usr_gh[uname] = gname self.idp_accs[uname] = gnames n.append(uname)