ditty 0.7.0 → 0.7.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/ditty/helpers/authentication.rb +1 -6
- data/lib/ditty/models/user.rb +7 -0
- data/lib/ditty/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c15560015979ad1fc7afda1efc7becd871635867ace4fa364f47eb6473baf5e4
|
4
|
+
data.tar.gz: 2ea52af0c53587b08562f5a594b7f0b951638310f60a4c5ce2ce5ac937e2efbd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0aa2bd4eb180cf51106d4d645e0effd68a924c866bba915f26526e30d4dfe11d8f800ac32e1779c738e606a39b1a6b003b4039902b43d8a1cde1f2cc2890f9e6
|
7
|
+
data.tar.gz: 39c61fef5b3fad41838de4903b88e16df4b606bd9249421d2db9ede59ed75855f2bc0936aaf84e1a8dc8cce17a0d966520cffaf50196446f91ba20e165ee8b9e
|
@@ -8,7 +8,7 @@ module Ditty
|
|
8
8
|
module Helpers
|
9
9
|
module Authentication
|
10
10
|
def current_user
|
11
|
-
return
|
11
|
+
return nil if current_user_id.nil?
|
12
12
|
@current_user ||= User[current_user_id]
|
13
13
|
end
|
14
14
|
|
@@ -40,11 +40,6 @@ module Ditty
|
|
40
40
|
env['rack.session'].delete('user_id') unless env['rack.session'].nil?
|
41
41
|
env.delete('omniauth.auth')
|
42
42
|
end
|
43
|
-
|
44
|
-
def anonymous_user
|
45
|
-
role = ::Ditty::Role.where(name: 'anonymous').first
|
46
|
-
::Ditty::User.where(roles: role).first unless role.nil?
|
47
|
-
end
|
48
43
|
end
|
49
44
|
|
50
45
|
class NotAuthenticated < StandardError
|
data/lib/ditty/models/user.rb
CHANGED
data/lib/ditty/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ditty
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.
|
4
|
+
version: 0.7.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jurgens du Toit
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-09-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|