X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/3cfb8b7d053edfba454dbcb1eff09382b5dca193..84a0c76ab2a09a05e10b9057c9087a342db5f7e2:/app/controllers/api/changesets_controller.rb?ds=sidebyside diff --git a/app/controllers/api/changesets_controller.rb b/app/controllers/api/changesets_controller.rb index 517cff473..7f0ee1276 100644 --- a/app/controllers/api/changesets_controller.rb +++ b/app/controllers/api/changesets_controller.rb @@ -63,7 +63,7 @@ module Api @changeset = Changeset.find(params[:id]) if params[:include_discussion].presence @comments = @changeset.comments - @comments = @comments.unscope(:where => :visible) if params[:show_hidden_comments].presence && can?(:restore, ChangesetComment) + @comments = @comments.unscope(:where => :visible) if params[:show_hidden_comments].presence && can?(:create, :changeset_comment_visibility) @comments = @comments.includes(:author) end