added authorization for edit and update actions