driftrock-service 0.2.6 → 0.2.7
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/driftrock-service/version.rb +1 -1
- data/lib/driftrock-service.rb +5 -3
- metadata +1 -1
data/lib/driftrock-service.rb
CHANGED
@@ -14,6 +14,7 @@ module Driftrock
|
|
14
14
|
module ClassMethods
|
15
15
|
def act_as_driftrock_app
|
16
16
|
if respond_to?(:before_filter)
|
17
|
+
before_filter :add_p3p_header
|
17
18
|
before_filter :authorise, except: :driftrock_app_status
|
18
19
|
end
|
19
20
|
include Driftrock::Service::Api::Data
|
@@ -32,6 +33,10 @@ module Driftrock
|
|
32
33
|
base.extend ClassMethods
|
33
34
|
end
|
34
35
|
|
36
|
+
def header
|
37
|
+
response.headers["p3p"] = "CP=\"IDC DSP COR ADM DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR IND CNT\""
|
38
|
+
end
|
39
|
+
|
35
40
|
def authorise
|
36
41
|
puts "SESSION #{session}"
|
37
42
|
return if session && session[:user_id] && session[:company_id]
|
@@ -47,9 +52,6 @@ module Driftrock
|
|
47
52
|
else
|
48
53
|
session[:user_id] = params[:user_id]
|
49
54
|
session[:company_id] = params[:company_id]
|
50
|
-
@driftrock_user_id = params[:user_id]
|
51
|
-
@driftrock_company_id = params[:company_id]
|
52
|
-
@set_session_form = true
|
53
55
|
puts "SESSION AFTER #{session}"
|
54
56
|
end
|
55
57
|
end
|