extended the attachRole() to take a project as well
did a dumb fix for the afterSave() and made $success an optional
argument. Even though $success is never used in the function...