Create api changeset comment visibility resource
This commit is contained in:
parent
457cc99349
commit
84a0c76ab2
13 changed files with 356 additions and 299 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue