微信课件下载修改

weixin_guange
yuanke 9 years ago
parent 9997de0d96
commit 564da2ed72

@ -372,7 +372,8 @@ class ApplicationController < ActionController::Base
return true
end
if allowed
if allowed || (params[:type] && params[:type] == "wechat" )
true
else
if @project && @project.archived?

@ -130,7 +130,7 @@ class AttachmentsController < ApplicationController
def download
# modify by nwb
# 下载添加权限设置
if params[:type] == "wechat"
if (params[:type] && params[:type] == "wechat" )
candown = true
else
candown = attachment_candown @attachment
@ -715,7 +715,7 @@ class AttachmentsController < ApplicationController
def has_login
unless (@attachment && @attachment.container_type == "Organization").nil?
unless (@attachment && @attachment.container_type == "PhoneAppVersion").nil?
render_403 if !User.current.logged? && !(@attachment.container_type == 'OrgSubfield' && @attachment.container.organization.allow_guest_download) && !(@attachment.container_type == 'OrgDocumentComment' && @attachment.container.organization.allow_guest_download)
render_403 if (!User.current.logged? && !(params[:type] && params[:type] == "wechat")) && !(@attachment.container_type == 'OrgSubfield' && @attachment.container.organization.allow_guest_download) && !(@attachment.container_type == 'OrgDocumentComment' && @attachment.container.organization.allow_guest_download)
end
end
end

Loading…
Cancel
Save