There is a method for part of this Rubygem#create_ownership(user)