Added type safety to permissions on repositories in REST API.