Feature/permissions

This re-introduces the same functional scope as the old permissions, but with the new syntax.