diff --git a/app/controllers/admin/versions_controller.rb b/app/controllers/admin/versions_controller.rb index 8048595f..d9f684f8 100644 --- a/app/controllers/admin/versions_controller.rb +++ b/app/controllers/admin/versions_controller.rb @@ -7,8 +7,7 @@ module Admin @conf_ids_with_role = current_user.is_admin? ? Conference.pluck(:short_title) : Conference.with_role([:organizer, :cfp, :info_desk], current_user).pluck(:short_title) return if @conference.blank? - authorize! :index, PaperTrail::Version.new(conference_id: @conference.id) - @versions = @versions.where(conference_id: @conference.id) + @versions = PaperTrail::Version.where(conference_id: @conference.id).accessible_by(current_ability) end def revert_attribute