mirror of
https://github.com/9001/copyparty.git
synced 2025-12-08 06:03:29 -07:00
wram: also prevent moves
in addition to write-perms, also drop move-perms from ramdisks since that is another potential source for confusion additionally, write-access was correctly prevented, but the ui would still indicate write permission, so fix that too
This commit is contained in:
parent
29925dc22b
commit
fa918228d5
|
|
@ -211,6 +211,12 @@ def ramdisk_chk(asrv: AuthSrv) -> None:
|
|||
if fs == "tmpfs" or (mp == "/" and fs in ramfs):
|
||||
mods.append((vn.vpath, ap, fs, mp))
|
||||
vn.axs.uwrite.clear()
|
||||
vn.axs.umove.clear()
|
||||
for un, ztsp in list(vn.uaxs.items()):
|
||||
zsl = list(ztsp)
|
||||
zsl[1] = False
|
||||
zsl[2] = False
|
||||
vn.uaxs[un] = zsl
|
||||
if mods:
|
||||
t = "WARNING: write-access was removed from the following volumes because they are not mapped to an actual HDD for storage! All uploaded data would live in RAM only, and all uploaded files would be LOST on next reboot. To allow uploading and ignore this hazard, enable the 'wram' option (global/volflag). List of affected volumes:"
|
||||
t2 = ["\n volume=[/%s], abspath=%r, type=%s, root=%r" % x for x in mods]
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@
|
|||
📝<input type="text" name="name" class="i" placeholder="weekend-plans">
|
||||
<input type="submit" value="new file">
|
||||
</form>
|
||||
<span id="new_mdi"></p>
|
||||
<span id="new_mdi"></span>
|
||||
</div>
|
||||
|
||||
<div id="op_msg" class="opview opbox {% if not ls0 %}act{% endif %}">
|
||||
|
|
|
|||
Loading…
Reference in a new issue