tkh_authentication 0.0.4 → 0.0.5
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.
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -48,13 +48,13 @@ To display the login information module anywhere in your views
|
|
48
48
|
|
49
49
|
render 'shared/login_info'
|
50
50
|
|
51
|
-
|
51
|
+
Ifo restrict access to your controllers to logged in users:
|
52
52
|
|
53
|
-
before_filter :authenticate
|
53
|
+
before_filter :authenticate, except: 'show'
|
54
54
|
|
55
|
-
|
55
|
+
Additionally, if you want to restrict access to users whose admin boolean attribute is true, add this line just below the authenticate one.
|
56
56
|
|
57
|
-
before_filter :authenticate_with_admin
|
57
|
+
before_filter :authenticate_with_admin, except: [ 'show', 'index' ]
|
58
58
|
|
59
59
|
|
60
60
|
## Contributing
|
data/lib/tkh_authentication.rb
CHANGED
@@ -7,7 +7,7 @@ require 'tkh_authentication/tkh_authentication_helper'
|
|
7
7
|
|
8
8
|
module TkhAuthentication
|
9
9
|
class Engine < ::Rails::Engine
|
10
|
-
#
|
10
|
+
# to extend the application helper in the host app
|
11
11
|
initializer 'tkh_authentication.helper' do |app|
|
12
12
|
ActionView::Base.send :include, TkhAuthenticationHelper
|
13
13
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tkh_authentication
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.5
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -171,7 +171,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
171
171
|
version: '0'
|
172
172
|
segments:
|
173
173
|
- 0
|
174
|
-
hash: -
|
174
|
+
hash: -197654925651461113
|
175
175
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
176
176
|
none: false
|
177
177
|
requirements:
|
@@ -180,7 +180,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
180
180
|
version: '0'
|
181
181
|
segments:
|
182
182
|
- 0
|
183
|
-
hash: -
|
183
|
+
hash: -197654925651461113
|
184
184
|
requirements: []
|
185
185
|
rubyforge_project:
|
186
186
|
rubygems_version: 1.8.23
|