Allow `role` to be specified when creating / editing

See #335, #392