恢复被还原的代码

This commit is contained in:
z9hang 2014-11-25 16:00:52 +08:00
parent be31444b43
commit 874936a131
1 changed files with 1 additions and 1 deletions

View File

@ -64,7 +64,7 @@ class AttachmentsController < ApplicationController
# modify by nwb # modify by nwb
# 下载添加权限设置 # 下载添加权限设置
candown = false candown = false
if (@attachment.container.has_attribute?(:project) || @attachment.container.has_attribute?(:project_id)) && @attachment.container.project if @attachment.container.class.to_s != "HomeworkAttach" && (@attachment.container.has_attribute?(:project) || @attachment.container.has_attribute?(:project_id)) && @attachment.container.project
project = @attachment.container.project project = @attachment.container.project
candown= User.current.member_of?(project) || (project.is_public && @attachment.is_public == 1) candown= User.current.member_of?(project) || (project.is_public && @attachment.is_public == 1)
elsif @attachment.container.is_a?(Project) elsif @attachment.container.is_a?(Project)