]> git.openstreetmap.org Git - rails.git/blobdiff - app/controllers/api/changesets_controller.rb
Create api changeset comment visibility resource
[rails.git] / app / controllers / api / changesets_controller.rb
index 517cff47326d28853cacd96416c718c8b5d81b69..7f0ee1276752d8b986ff3ab0d7b274c6ae657886 100644 (file)
@@ -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