all the tests pass! think I even fixed some old bugs.

now, to actually implement the permissions...