user_mgmt 2.1.0 → 2.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4633c71419ba533e83aba47e45c9bcfe5628681e
|
4
|
+
data.tar.gz: ed34ee174c2da6903f878c8f3d3a83fb2dfc28dd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dcae24b96a4d8d645dd6c853d0f68b90ea4cf3514d73fe72161838951ffde90495a68f4c629a8c8fbb347a409b60162e04b133d0638a035718cdbaca1a2f07a0
|
7
|
+
data.tar.gz: 5e2957a58cae5ac98d91de3b251b08743f55fd520abdd386b3671119d55d1491317081db275512a0d174b65e7ab9bc406c0bb8650a44d7bf13751f2ad054b34a
|
@@ -17,8 +17,11 @@ module UserMgmt
|
|
17
17
|
|
18
18
|
if response[:status] == "200"
|
19
19
|
flash[:success] = "User logged in!"
|
20
|
-
|
21
|
-
|
20
|
+
cookies[:user_session_id] = {
|
21
|
+
value: response[:body]["session"],
|
22
|
+
expires: 1.hour.from_now,
|
23
|
+
domain: ".stewardly.ca"
|
24
|
+
}
|
22
25
|
redirect_to main_app.root_path
|
23
26
|
else
|
24
27
|
flash[:error] = response[:body]
|
@@ -2,18 +2,18 @@ module UserMgmt
|
|
2
2
|
module ApplicationHelper
|
3
3
|
|
4
4
|
def user_logged_in?
|
5
|
-
return false if
|
6
|
-
status = user_info(
|
5
|
+
return false if cookies[:user_session_id] == nil
|
6
|
+
status = user_info(cookies[:user_session_id])[:status]
|
7
7
|
if status == "200"
|
8
8
|
return true
|
9
9
|
else
|
10
|
-
|
10
|
+
cookies.delete(:user_session_id, domain: ".stewardly.ca")
|
11
11
|
return false
|
12
12
|
end
|
13
13
|
end
|
14
14
|
|
15
15
|
def current_user
|
16
|
-
@current_user ||= user_info(
|
16
|
+
@current_user ||= user_info(cookies[:user_session_id])[:body] unless cookies[:user_session_id] == nil
|
17
17
|
end
|
18
18
|
|
19
19
|
def sign_up email, password, password_confirmation, host=UserMgmt.external_database_URI
|
data/lib/user_mgmt/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: user_mgmt
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.1.
|
4
|
+
version: 2.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Danilo Faria, Fernando Gorodscy, Josh Leslie
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-06-
|
11
|
+
date: 2014-06-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sqlite3
|