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:
ed 2025-12-04 17:50:17 +00:00
parent 29925dc22b
commit fa918228d5
2 changed files with 7 additions and 1 deletions

View file

@ -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]

View file

@ -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 %}">