From c41e85f51f6c457258d71aa82e32846e3de0f24c Mon Sep 17 00:00:00 2001 From: cxt <853663049@qq.com> Date: Fri, 6 Sep 2019 19:54:56 +0800 Subject: [PATCH] tiaoz --- app/views/task_banks/show.json.jbuilder | 1 + 1 file changed, 1 insertion(+) diff --git a/app/views/task_banks/show.json.jbuilder b/app/views/task_banks/show.json.jbuilder index b929fafd8..ab53399e1 100644 --- a/app/views/task_banks/show.json.jbuilder +++ b/app/views/task_banks/show.json.jbuilder @@ -1,5 +1,6 @@ json.(@bank, :id, :name, :description, :task_type, :is_public) # 附件 +json.authorize @bank.user_id == current_user.id || current_user.admin? json.attachments @bank_attachments do |attachment| json.partial! "attachments/attachment_simple", locals: {attachment: attachment} end