panda_pal 5.3.0 → 5.3.2
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 58d85faabac6cdf22825470f81fed8395597e998
|
4
|
+
data.tar.gz: b8a1cbcca9ee21e75ebbc6ef639838211f68271b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d33dbc91baaae98777f01f373e2aa88d7a260d9765e0d924f2dffbddbc8af427e84b0f83ed99d4d9219569dc8fbea4235fca5e74ee091ee4e02ef0fd0b6c1008
|
7
|
+
data.tar.gz: a95ca21355c9fb8b0ceb4b9ca50d8b2d7cf9d3b366207991a7a650a3634834a663c2ba102688315765aac1ab5b0cd18aebb8f75e1220f16c3304e7dc2208a7b8
|
@@ -4,9 +4,9 @@ module PandaPal
|
|
4
4
|
|
5
5
|
def self.to_boolean(v)
|
6
6
|
if Rails.version < '5.0'
|
7
|
-
ActiveRecord::Type::Boolean.new.type_cast_from_user(
|
7
|
+
ActiveRecord::Type::Boolean.new.type_cast_from_user(v)
|
8
8
|
else
|
9
|
-
ActiveRecord::Type::Boolean.new.deserialize(
|
9
|
+
ActiveRecord::Type::Boolean.new.deserialize(v)
|
10
10
|
end
|
11
11
|
end
|
12
12
|
end
|
@@ -102,12 +102,11 @@ module PandaPal::Helpers
|
|
102
102
|
end
|
103
103
|
|
104
104
|
def valid_session?
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
].all?
|
105
|
+
return false unless current_session(create_missing: false)&.persisted?
|
106
|
+
return false unless current_organization
|
107
|
+
return false unless current_session.panda_pal_organization_id == current_organization.id
|
108
|
+
return false unless Apartment::Tenant.current == current_organization.name
|
109
|
+
true
|
111
110
|
rescue SessionNonceMismatch
|
112
111
|
false
|
113
112
|
end
|
@@ -26,7 +26,7 @@ module PandaPal::Helpers
|
|
26
26
|
current_session.try(:save)
|
27
27
|
end
|
28
28
|
|
29
|
-
def current_session
|
29
|
+
def current_session(create_missing: true)
|
30
30
|
return @current_session if @current_session.present?
|
31
31
|
|
32
32
|
if params[:session_token]
|
@@ -47,7 +47,7 @@ module PandaPal::Helpers
|
|
47
47
|
@current_session = find_or_create_session(key: session_key)
|
48
48
|
end
|
49
49
|
|
50
|
-
@current_session ||= find_or_create_session(key: :create)
|
50
|
+
@current_session ||= find_or_create_session(key: :create) if create_missing
|
51
51
|
|
52
52
|
@current_session
|
53
53
|
end
|
data/lib/panda_pal/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: panda_pal
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.3.
|
4
|
+
version: 5.3.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Instructure ProServe
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-09-
|
11
|
+
date: 2020-09-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -300,7 +300,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
300
300
|
version: '0'
|
301
301
|
requirements: []
|
302
302
|
rubyforge_project:
|
303
|
-
rubygems_version: 2.
|
303
|
+
rubygems_version: 2.5.2.1
|
304
304
|
signing_key:
|
305
305
|
specification_version: 4
|
306
306
|
summary: LTI mountable engine
|