Change permission check to name.