X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/b32e23b4126ded330e9bfd15109521a1f281cbef..648b8ba1f83e9923bb43a9175ea548405c9a403d:/app/controllers/api/changesets_controller.rb 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