|
|
|
@ -24,7 +24,11 @@ class OrgDocumentCommentsController < ApplicationController
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
def index
|
|
|
|
|
@documents = @organization.org_document_comments.where("parent_id is null").order("created_at desc")
|
|
|
|
|
if @organization.is_public? || User.current.admin? || User.current.member_of_org?(@organization)
|
|
|
|
|
@documents = @organization.org_document_comments.where("parent_id is null").order("created_at desc")
|
|
|
|
|
else
|
|
|
|
|
render_403
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
def update
|
|
|
|
|
@org_document = OrgDocumentComment.find(params[:id])
|
|
|
|
|