add a custom test for determining editability

--HG--
branch : noink
refactor a bit, since this will be a repeating pattern

--HG--
branch : noink