Fix permissions model to save objects properly