allow setting lifetimes from up2k ui

This commit is contained in:
ed 2022-09-19 23:49:07 +02:00
parent 1882afb8b6
commit 0b87a4a810
11 changed files with 214 additions and 26 deletions

View file

@ -1121,6 +1121,16 @@ class AuthSrv(object):
vol.flags = {k: v for k, v in vol.flags.items() if not k.startswith(rm)}
ints = ["lifetime"]
for k in list(vol.flags):
if k in ints:
vol.flags[k] = int(vol.flags[k])
if "lifetime" in vol.flags and "e2d" not in vol.flags:
t = 'removing lifetime config from volume "/{}" because e2d is disabled'
self.log(t.format(vol.vpath), 1)
del vol.flags["lifetime"]
# verify tags mentioned by -mt[mp] are used by -mte
local_mtp = {}
local_only_mtp = {}