adds permissions test to db/repo