mirror of
https://github.com/9001/copyparty.git
synced 2026-04-12 23:32:32 -06:00
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
This commit is contained in:
parent
7908d880da
commit
1272de9de5
|
|
@ -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
|
||||
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)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue