Refactor method that copies permission recursively