tkh_authentication 0.9.4 → 0.9.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/lib/tkh_authentication/tkh_authentication_helper.rb +3 -3
- data/lib/tkh_authentication/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1a7afe9dcd3176a184e4db9ac774d297029c8588
|
4
|
+
data.tar.gz: 52b51af55817bbdf78a39fd99b78f721b53e14f6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0573af0c15b7f6f4040e17e5f518e31823a0d9ff2cf545221530aae8706904cc0194ee6812089a88ca9f244cdec9b46b37ff9344c9e41b72da0ad243f1fa0467
|
7
|
+
data.tar.gz: 6cd2981719211713cc538f3b4ebeec8a9c15422d4f00fb7187d1fe442f1b80f118b345986ce6f83e54b973fcb373f8ccdbea3fab517b9aebeb0e73f5b22e7b47
|
data/CHANGELOG.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
module TkhAuthenticationHelper
|
2
2
|
def self.included(base)
|
3
|
-
base.send(:include, InstanceMethods)
|
3
|
+
base.send(:include, InstanceMethods)
|
4
4
|
# base.before_filter :current_user
|
5
5
|
# base.after_filter :my_method_2
|
6
6
|
end
|
@@ -8,9 +8,9 @@ module TkhAuthenticationHelper
|
|
8
8
|
module InstanceMethods
|
9
9
|
# duplicated from action controller extension. there must be a better way
|
10
10
|
def current_user
|
11
|
-
@current_user ||= User.
|
11
|
+
@current_user ||= User.find_by!(auth_token: cookies[:auth_token]) if cookies[:auth_token]
|
12
12
|
end
|
13
|
-
|
13
|
+
|
14
14
|
# duplicated from action controller extension. there must be a better way
|
15
15
|
def administrator?
|
16
16
|
@administrator ||= current_user && current_user.admin?
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tkh_authentication
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Swami Atma
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-03-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|