mirror of
https://github.com/9001/copyparty.git
synced 2026-04-02 03:00:05 -04:00
fix textviewer with g permission; closes #927
textfiles can also be viewed with `foo.txt?v` for less jank
This commit is contained in:
@@ -6567,6 +6567,9 @@ class HttpCli(object):
|
|||||||
elif is_dir and not self.can_read:
|
elif is_dir and not self.can_read:
|
||||||
if use_dirkey:
|
if use_dirkey:
|
||||||
is_dk = True
|
is_dk = True
|
||||||
|
elif self.can_get and "doc" in self.uparam:
|
||||||
|
zs = vjoin(self.vpath, self.uparam["doc"]) + "?v"
|
||||||
|
return self.redirect(zs, flavor="redirecting to", use302=True)
|
||||||
elif not self.can_write:
|
elif not self.can_write:
|
||||||
return self.tx_404(True)
|
return self.tx_404(True)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user