allow unposting with write-only access

This commit is contained in:
ed 2022-04-16 23:35:04 +02:00
parent c4083a2942
commit f35e41baf1

View file

@ -1675,12 +1675,12 @@ class Up2k(object):
vn, rem = vn.get_dbv(rem)
unpost = False
except:
# unpost with missing permissions? try read+write and verify with db
# unpost with missing permissions? verify with db
if not self.args.unpost:
raise Pebkac(400, "the unpost feature is disabled in server config")
unpost = True
permsets = [[True, True]]
permsets = [[False, True]]
vn, rem = self.asrv.vfs.get(vpath, uname, *permsets[0])
vn, rem = vn.get_dbv(rem)
_, _, _, _, dip, dat = self._find_from_vpath(vn.realpath, rem)