看图不登录
This commit is contained in:
parent
87fdecdabd
commit
2b679b1ef9
|
@ -21,7 +21,7 @@ class AttachmentsController < ApplicationController
|
||||||
before_filter :delete_authorize, :only => :destroy
|
before_filter :delete_authorize, :only => :destroy
|
||||||
before_filter :authorize_global, :only => :upload
|
before_filter :authorize_global, :only => :upload
|
||||||
|
|
||||||
before_filter :require_login, only: [:download]
|
before_filter :login_without_softapplication, only: [:download]
|
||||||
|
|
||||||
accept_api_auth :show, :download, :upload
|
accept_api_auth :show, :download, :upload
|
||||||
|
|
||||||
|
@ -207,4 +207,9 @@ private
|
||||||
end
|
end
|
||||||
content_type.to_s
|
content_type.to_s
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def login_without_softapplication
|
||||||
|
referer = request.headers["Referer"]
|
||||||
|
require_login unless referer =~ /softapplication/
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue