Error if set command is used on read-only element
authorJeremy Stanley <fungi@yuggoth.org>
Mon, 31 Jul 2017 15:14:08 +0000 (15:14 +0000)
committerJeremy Stanley <fungi@yuggoth.org>
Mon, 31 Jul 2017 15:14:08 +0000 (15:14 +0000)
commitcf48b2ab0a6c287a3d6f3d9a1a4dac9bb49c0afc
tree15ce92ee34d7f02a30c4384844fdbd5deaafe1bf
parent705fe9a0a0e5bc25989cbac3944dad5763f69446
Error if set command is used on read-only element

It is possible for an admin to accidentally attempt to set a facet
on an element from a read-only file. If this happens, trap the
PermissionError exception and return a clear error message to the
user instead of crashing the service. Also add a regression test to
make sure this continues to work as intended, since preventing
alteration of read-only elements is a critical security measure we
need to make certain we preserve going forward.
mudpy/misc.py
mudpy/tests/selftest.py