fixed and simplified permissions tests