nyauth 0.4.0 → 0.5.0
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 +4 -4
- data/README.md +30 -11
- data/app/controllers/concerns/nyauth/client_concern.rb +0 -12
- data/app/controllers/concerns/nyauth/session_concern.rb +4 -2
- data/app/controllers/nyauth/confirmation_requests_controller.rb +2 -1
- data/app/controllers/nyauth/reset_password_requests_controller.rb +2 -1
- data/app/views/nyauth/confirmation_requests/new.html.erb +6 -2
- data/app/views/nyauth/confirmations/edit.html.erb +3 -1
- data/app/views/nyauth/passwords/edit.html.erb +11 -4
- data/app/views/nyauth/registrations/new.html.erb +16 -5
- data/app/views/nyauth/reset_password_requests/new.html.erb +6 -2
- data/app/views/nyauth/reset_passwords/edit.html.erb +11 -4
- data/app/views/nyauth/sessions/new.html.erb +26 -4
- data/config/locales/en.yml +17 -0
- data/config/locales/ja.yml +17 -0
- data/lib/generators/nyauth/templates/nyauth_install_initializer.rb +1 -0
- data/lib/nyauth/configuration.rb +3 -1
- data/lib/nyauth/version.rb +1 -1
- data/spec/dummy/app/controllers/secret_pages_controller.rb +3 -0
- data/spec/dummy/app/views/layouts/application.html.erb +5 -4
- data/spec/dummy/app/views/pages/index.html.erb +1 -0
- data/spec/dummy/app/views/secret_pages/show.html.erb +16 -0
- data/spec/dummy/config/routes.rb +1 -1
- data/spec/dummy/db/development.sqlite3 +0 -0
- data/spec/dummy/db/test.sqlite3 +0 -0
- data/spec/dummy/log/development.log +1565 -0
- data/spec/dummy/log/test.log +13691 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/v3.0/2NBqGhntP-vkXcqELAsDTzmnheGw93xJN_VGA0pgaRE.cache +2 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/v3.0/5Lly_CA8DZvPhQV2jDQx-Y6P_y3Ygra9t5jfSlGhHDA.cache +2 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/v3.0/7PsmVUbUntxOpqpWdEwUU4-Vch3oiySq_JGxTbJ5PpY.cache +1 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/v3.0/9ZmbprB8JTP8NcS2v6ybrL-s1igpVDmvrecDQ4EoT98.cache +1 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/v3.0/9i_17ApHgLHXHlwXbU9QEfNrNMgVPjAoAk0EfGS-cWw.cache +1 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/v3.0/AGwGz3BSkc6R8VNuXsktaud9VfwJJKExEOkMfRgl5gs.cache +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/v3.0/CNXGLOU1u3FFzGFDMg_4iNcdCDd2iAmoOaiRROni8Tk.cache +2 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/v3.0/IWK3eA3Xg7xhMT1dZKZVm3upMCwIJ0SQ9OSvgr5EQSQ.cache +1 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/v3.0/KMlhnvtwFQuyaaZ195Lj0w5MK5NNri6jl69DuQoTAE4.cache +1 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/v3.0/M7oa-ssP0ThBOv3o2FcsdNgXY3vxnpfs-rW3tIOkwkU.cache +2 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/v3.0/Mtcj1AvQERunaFbrg0NFwhWrp4x9xeiPyIOk6-0MbFY.cache +1 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/v3.0/OI6uxGcnsKavdWTtwDAasU3wPx8QXhzBgV0X2n1KjMQ.cache +3 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/v3.0/TCPOmqTgyNFovZmHXHUPPumf8jHDXCMHIu91bxyq_qM.cache +1 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/v3.0/TsqcIsRVwdzA3lX08Qq7drAL4zLsBcHhTmvYA0iYlFg.cache +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/v3.0/U99dHIig7_F_E5FAiaD3KbJB48rLrPrdk7UMoFBZtUE.cache +1 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/v3.0/XuYgzNIa4BPGLEWP7iJYh1iWKGXYBhpo1klyENS2YaU.cache +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/v3.0/hZ2TcST6QnJ8TDpZyPBNxtk7UDcicV2wNr1w45WT-nc.cache +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/v3.0/j1T-PJkAzqG60b8uyQJuze9TkQ9rCNkZaDDyFBNgOxs.cache +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/v3.0/nFnIur4O1YIyM8EzA8Qe0RoJLQ0pgsYdum1MnIENOyg.cache +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/v3.0/rZS2dSuZR3CGbChyMtQnJmfrHS-eYItGdlz8HLRVRP4.cache +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/v3.0/vwm1k9Bq-HwABJMegaJmccXR8JXBcp7a46peIjalZug.cache +1 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/v3.0/xNxWjlD2nQ_nHrl6FvGZ5mhn4F5A5XJAlz029Se49y4.cache +2 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/v3.0/xwVAR1lusWTxEOYWi4lpQKQqP7gDm7juRZ4ClCEBR00.cache +1 -0
- data/spec/featrues/nyauth/confirmation_requests_spec.rb +2 -2
- data/spec/featrues/nyauth/passwords_spec.rb +2 -2
- data/spec/featrues/nyauth/registrations_spec.rb +2 -2
- data/spec/featrues/nyauth/reset_password_requests_spec.rb +3 -3
- data/spec/featrues/nyauth/sessions_spec.rb +10 -9
- data/spec/lib/generators/nyauth/tmp/app/views/nyauth/confirmation_requests/new.html.erb +6 -2
- data/spec/lib/generators/nyauth/tmp/app/views/nyauth/confirmations/edit.html.erb +3 -1
- data/spec/lib/generators/nyauth/tmp/app/views/nyauth/passwords/edit.html.erb +11 -4
- data/spec/lib/generators/nyauth/tmp/app/views/nyauth/registrations/new.html.erb +16 -5
- data/spec/lib/generators/nyauth/tmp/app/views/nyauth/reset_password_requests/new.html.erb +6 -2
- data/spec/lib/generators/nyauth/tmp/app/views/nyauth/reset_passwords/edit.html.erb +11 -4
- data/spec/lib/generators/nyauth/tmp/app/views/nyauth/sessions/new.html.erb +26 -4
- metadata +53 -9
- data/spec/dummy/app/controllers/posts_controller.rb +0 -6
- data/spec/dummy/app/views/posts/index.html.erb +0 -0
- data/spec/dummy/tmp/pids/server.pid +0 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: f37035167e1f90170a80e5e56b0523d7bc51b64e
|
|
4
|
+
data.tar.gz: 066c6ab929e8ec5a62bf4f408d907af17fb1a86e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 6345b60be6812d70b38e502fae73fe497b342db02843c56579ffa70d5d8f57445464019d6deb59711baeb536df2b33e521b9bd94548289088e3c699a2919cb1b
|
|
7
|
+
data.tar.gz: 0fd6d78ce22fc48f4cb0a10bf7912ceedd8b1fec33db34a2dc3a167f87eb511c6fbcf9c197af15ef7bf51158ed529791dfeeff39a2ad81398b8309d8b98a6242
|
data/README.md
CHANGED
|
@@ -135,6 +135,7 @@ nyauth.configure do |config|
|
|
|
135
135
|
config.encryption_secret = ENV['NYAUTH_ENCRYPTION_SECRET'] || ENV['SECRET_KEY_BASE']
|
|
136
136
|
config.confirmation_expire_limit = 1.hour
|
|
137
137
|
config.reset_password_expire_limit = 1.hour
|
|
138
|
+
config.mail_delivery_method = :deliver_now
|
|
138
139
|
config.redirect_path do |urls|
|
|
139
140
|
# config.redirect_path_after_sign_in = -> (client_name) {
|
|
140
141
|
# if client_name == :admin
|
|
@@ -158,39 +159,57 @@ end
|
|
|
158
159
|
I18n
|
|
159
160
|
|
|
160
161
|
```yaml
|
|
161
|
-
|
|
162
|
+
en:
|
|
162
163
|
flash:
|
|
163
164
|
nyauth:
|
|
164
165
|
passwords:
|
|
165
166
|
update:
|
|
166
|
-
notice: '
|
|
167
|
+
notice: 'updated password'
|
|
167
168
|
registrations:
|
|
168
169
|
create:
|
|
169
|
-
notice: '
|
|
170
|
+
notice: 'registration success'
|
|
170
171
|
sessions:
|
|
171
172
|
create:
|
|
172
|
-
notice: '
|
|
173
|
+
notice: 'sign in success'
|
|
173
174
|
destroy:
|
|
174
|
-
notice: '
|
|
175
|
+
notice: 'sign out success'
|
|
175
176
|
confirmations:
|
|
176
177
|
update:
|
|
177
|
-
notice: '
|
|
178
|
+
notice: 'confirmed'
|
|
178
179
|
confirmation_requests:
|
|
179
180
|
create:
|
|
180
|
-
notice: '
|
|
181
|
+
notice: 'sent mail'
|
|
181
182
|
reset_password_requests:
|
|
182
183
|
create:
|
|
183
|
-
notice: '
|
|
184
|
+
notice: 'sent mail'
|
|
184
185
|
reset_passwords:
|
|
185
186
|
update:
|
|
186
|
-
notice: '
|
|
187
|
+
notice: 'updated password'
|
|
187
188
|
activerecord:
|
|
188
189
|
errors:
|
|
189
190
|
messages:
|
|
190
|
-
key_expired: 'URL
|
|
191
|
+
key_expired: 'This URL is expired'
|
|
191
192
|
errors:
|
|
192
193
|
messages:
|
|
193
|
-
invalid_email_or_password: '
|
|
194
|
+
invalid_email_or_password: 'Invalid email or password'
|
|
195
|
+
invalid_email: 'Invalid email'
|
|
196
|
+
nav:
|
|
197
|
+
nyauth:
|
|
198
|
+
common:
|
|
199
|
+
send: 'Send'
|
|
200
|
+
set: 'Set'
|
|
201
|
+
update: 'Update'
|
|
202
|
+
sessions:
|
|
203
|
+
new: 'Sign in'
|
|
204
|
+
destroy: 'Sign out'
|
|
205
|
+
registrations:
|
|
206
|
+
new: 'Sign up'
|
|
207
|
+
passwords:
|
|
208
|
+
edit: 'Change password'
|
|
209
|
+
reset_password_requests:
|
|
210
|
+
new: 'Reset password'
|
|
211
|
+
confirmation_requests:
|
|
212
|
+
new: 'Confirm E-mail address'
|
|
194
213
|
```
|
|
195
214
|
|
|
196
215
|
## test
|
|
@@ -4,8 +4,6 @@ module Nyauth
|
|
|
4
4
|
included do |base|
|
|
5
5
|
helper_method :nyauth_client_class
|
|
6
6
|
helper_method :nyauth_client_name
|
|
7
|
-
helper_method :client_class # deprecated
|
|
8
|
-
helper_method :client_name # deprecated
|
|
9
7
|
end
|
|
10
8
|
|
|
11
9
|
def initialize
|
|
@@ -29,15 +27,5 @@ module Nyauth
|
|
|
29
27
|
def nyauth_client_name
|
|
30
28
|
nyauth_client_class.name.underscore.to_sym
|
|
31
29
|
end
|
|
32
|
-
|
|
33
|
-
def client_class
|
|
34
|
-
warn 'DEPRECATION WARNING: client_class is deprecated. Please use nyauth_client_class'
|
|
35
|
-
nyauth_client_class
|
|
36
|
-
end
|
|
37
|
-
|
|
38
|
-
def client_name
|
|
39
|
-
warn 'DEPRECATION WARNING: client_name is deprecated. Please use nyauth_client_name'
|
|
40
|
-
nyauth_client_name
|
|
41
|
-
end
|
|
42
30
|
end
|
|
43
31
|
end
|
|
@@ -36,8 +36,10 @@ module Nyauth
|
|
|
36
36
|
options.reverse_merge!(as: :user)
|
|
37
37
|
return if self.class.allow_actions == :all
|
|
38
38
|
return if self.class.allow_actions.present? && request[:action].to_sym.in?(self.class.allow_actions)
|
|
39
|
-
|
|
40
|
-
|
|
39
|
+
unless signed_in?(options)
|
|
40
|
+
session["#{options[:as]}_return_to"] = request.url if request.get?
|
|
41
|
+
redirect_to new_session_path_for(options[:as])
|
|
42
|
+
end
|
|
41
43
|
end
|
|
42
44
|
|
|
43
45
|
def current_authenticated(options = {})
|
|
@@ -27,7 +27,8 @@ module Nyauth
|
|
|
27
27
|
end
|
|
28
28
|
|
|
29
29
|
def send_mail
|
|
30
|
-
Nyauth::RequestMailer.request_reset_password(@service.client)
|
|
30
|
+
Nyauth::RequestMailer.request_reset_password(@service.client)
|
|
31
|
+
.__send__(Nyauth.configuration.mail_delivery_method)
|
|
31
32
|
end
|
|
32
33
|
end
|
|
33
34
|
end
|
|
@@ -1,4 +1,8 @@
|
|
|
1
|
+
<div class="nyauth-error-messages">
|
|
2
|
+
<%= @service.errors.full_messages.join(',') %>
|
|
3
|
+
</div>
|
|
4
|
+
|
|
1
5
|
<%= form_for @service, url: confirmation_requests_path_for(nyauth_client_name) do |f| %>
|
|
2
|
-
<%= f.email_field :email %>
|
|
3
|
-
<%= f.submit '
|
|
6
|
+
<%= f.email_field :email, placeholder: 'email' %>
|
|
7
|
+
<%= f.submit t('nav.nyauth.common.send') %>
|
|
4
8
|
<% end %>
|
|
@@ -1,6 +1,13 @@
|
|
|
1
|
+
<div class="nyauth-error-messages">
|
|
2
|
+
<%= @client.errors.full_messages.join(',') %>
|
|
3
|
+
</div>
|
|
4
|
+
|
|
1
5
|
<%= form_for @client, url: password_path_for(nyauth_client_name) do |f| %>
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
+
<div>
|
|
7
|
+
<%= f.password_field :password, placeholder: 'password' %>
|
|
8
|
+
</div>
|
|
9
|
+
<div>
|
|
10
|
+
<%= f.password_field :password_confirmation, placeholder: 'password confirmation' %>
|
|
11
|
+
</div>
|
|
12
|
+
<%= f.submit t('nav.nyauth.common.update') %>
|
|
6
13
|
<% end %>
|
|
@@ -1,7 +1,18 @@
|
|
|
1
|
+
<div class="nyauth-error-messages">
|
|
2
|
+
<%= @service.errors.full_messages.join(',') %>
|
|
3
|
+
</div>
|
|
4
|
+
|
|
1
5
|
<%= form_for @service, url: registration_path_for(nyauth_client_name) do |f| %>
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
6
|
+
<div>
|
|
7
|
+
<%= f.email_field :email, placeholder: 'email' %>
|
|
8
|
+
</div>
|
|
9
|
+
<div>
|
|
10
|
+
<%= f.password_field :password, placeholder: 'password' %>
|
|
11
|
+
</div>
|
|
12
|
+
<div>
|
|
13
|
+
<%= f.password_field :password_confirmation, placeholder: 'password confirmation' %>
|
|
14
|
+
</div>
|
|
15
|
+
<div>
|
|
16
|
+
<%= f.submit t('nav.nyauth.registrations.new') %>
|
|
17
|
+
</div>
|
|
7
18
|
<% end %>
|
|
@@ -1,4 +1,8 @@
|
|
|
1
|
+
<div class="nyauth-error-messages">
|
|
2
|
+
<%= @service.errors.full_messages.join(',') %>
|
|
3
|
+
</div>
|
|
4
|
+
|
|
1
5
|
<%= form_for @service, url: reset_password_requests_path_for(nyauth_client_name) do |f| %>
|
|
2
|
-
<%= f.text_field :email %>
|
|
3
|
-
<%= f.submit '
|
|
6
|
+
<%= f.text_field :email, placeholder: 'email' %>
|
|
7
|
+
<%= f.submit t('nav.nyauth.common.send') %>
|
|
4
8
|
<% end %>
|
|
@@ -1,6 +1,13 @@
|
|
|
1
|
+
<div class="nyauth-error-messages">
|
|
2
|
+
<%= @client.errors.full_messages.join(',') %>
|
|
3
|
+
</div>
|
|
4
|
+
|
|
1
5
|
<%= form_for @client, url: reset_password_path_for(nyauth_client_name, params[:reset_password_key]) do |f| %>
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
+
<div>
|
|
7
|
+
<%= f.password_field :password, placeholder: 'password' %>
|
|
8
|
+
</div>
|
|
9
|
+
<div>
|
|
10
|
+
<%= f.password_field :password_confirmation, placeholder: 'password confirmation' %>
|
|
11
|
+
</div>
|
|
12
|
+
<%= f.submit t('nav.nyauth.common.set') %>
|
|
6
13
|
<% end %>
|
|
@@ -1,6 +1,28 @@
|
|
|
1
|
+
<div class="nyauth-error-messages">
|
|
2
|
+
<%= @service.errors.full_messages.join(',') %>
|
|
3
|
+
</div>
|
|
4
|
+
|
|
1
5
|
<%= form_for @service, url: session_path_for(nyauth_client_name) do |f| %>
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
+
<div>
|
|
7
|
+
<%= f.email_field :email, placeholder: 'email' %>
|
|
8
|
+
</div>
|
|
9
|
+
<div>
|
|
10
|
+
<%= f.password_field :password, placeholder: 'password' %>
|
|
11
|
+
</div>
|
|
12
|
+
<div>
|
|
13
|
+
<%= f.submit t('nav.nyauth.sessions.new') %>
|
|
14
|
+
</div>
|
|
6
15
|
<% end %>
|
|
16
|
+
|
|
17
|
+
<ul>
|
|
18
|
+
<li>
|
|
19
|
+
<%= link_to new_registration_path_for(nyauth_client_name) do %>
|
|
20
|
+
<%= t('nav.nyauth.registrations.new') %>
|
|
21
|
+
<% end %>
|
|
22
|
+
</li>
|
|
23
|
+
<li>
|
|
24
|
+
<%= link_to new_reset_password_request_path_for(nyauth_client_name) do %>
|
|
25
|
+
<%= t('nav.nyauth.reset_password_requests.new') %>
|
|
26
|
+
<% end %>
|
|
27
|
+
</li>
|
|
28
|
+
</ul>
|
data/config/locales/en.yml
CHANGED
|
@@ -32,3 +32,20 @@ en:
|
|
|
32
32
|
messages:
|
|
33
33
|
invalid_email_or_password: 'Invalid email or password'
|
|
34
34
|
invalid_email: 'Invalid email'
|
|
35
|
+
nav:
|
|
36
|
+
nyauth:
|
|
37
|
+
common:
|
|
38
|
+
send: 'Send'
|
|
39
|
+
set: 'Set'
|
|
40
|
+
update: 'Update'
|
|
41
|
+
sessions:
|
|
42
|
+
new: 'Sign in'
|
|
43
|
+
destroy: 'Sign out'
|
|
44
|
+
registrations:
|
|
45
|
+
new: 'Sign up'
|
|
46
|
+
passwords:
|
|
47
|
+
edit: 'Change password'
|
|
48
|
+
reset_password_requests:
|
|
49
|
+
new: 'Reset password'
|
|
50
|
+
confirmation_requests:
|
|
51
|
+
new: 'Confirm E-mail address'
|
data/config/locales/ja.yml
CHANGED
|
@@ -32,3 +32,20 @@ ja:
|
|
|
32
32
|
messages:
|
|
33
33
|
invalid_email_or_password: 'ログイン情報に誤りがあります'
|
|
34
34
|
invalid_email: 'メールアドレスに誤りがあります'
|
|
35
|
+
nav:
|
|
36
|
+
nyauth:
|
|
37
|
+
common:
|
|
38
|
+
send: '送信する'
|
|
39
|
+
set: '設定する'
|
|
40
|
+
update: '更新する'
|
|
41
|
+
sessions:
|
|
42
|
+
new: 'ログイン'
|
|
43
|
+
destroy: 'ログアウト'
|
|
44
|
+
registrations:
|
|
45
|
+
new: '会員登録'
|
|
46
|
+
passwords:
|
|
47
|
+
edit: 'パスワード変更'
|
|
48
|
+
reset_password_requests:
|
|
49
|
+
new: 'パスワードリセット'
|
|
50
|
+
confirmation_requests:
|
|
51
|
+
new: 'メール認証'
|
|
@@ -2,6 +2,7 @@ Nyauth.configure do |config|
|
|
|
2
2
|
config.encryption_secret = ENV['NYAUTH_ENCRYPTION_SECRET']
|
|
3
3
|
config.confirmation_expire_limit = 1.hour
|
|
4
4
|
config.reset_password_expire_limit = 1.hour
|
|
5
|
+
config.mail_delivery_method = :deliver_now
|
|
5
6
|
config.redirect_path do |urls|
|
|
6
7
|
# config.redirect_path_after_sign_in = -> (client_name) {
|
|
7
8
|
# if client_name == :admin
|
data/lib/nyauth/configuration.rb
CHANGED
|
@@ -13,7 +13,8 @@ module Nyauth
|
|
|
13
13
|
:reset_password_expire_limit,
|
|
14
14
|
:password_minium,
|
|
15
15
|
:password_digest_stretches,
|
|
16
|
-
:encryption_secret
|
|
16
|
+
:encryption_secret,
|
|
17
|
+
:mail_delivery_method
|
|
17
18
|
|
|
18
19
|
|
|
19
20
|
def initialize
|
|
@@ -30,6 +31,7 @@ module Nyauth
|
|
|
30
31
|
@password_minium = 8
|
|
31
32
|
@password_digest_stretches = 1000
|
|
32
33
|
@encryption_secret = ENV['NYAUTH_ENCRYPTION_SECRET']
|
|
34
|
+
@mail_delivery_method = :deliver_now
|
|
33
35
|
@redirect_path_block = Proc.new {}
|
|
34
36
|
end
|
|
35
37
|
|
data/lib/nyauth/version.rb
CHANGED
|
@@ -8,19 +8,20 @@
|
|
|
8
8
|
</head>
|
|
9
9
|
<body>
|
|
10
10
|
|
|
11
|
-
<%= yield %>
|
|
12
11
|
<% if flash[:notice] %>
|
|
13
12
|
<%= flash[:notice] %>
|
|
14
13
|
<% end %>
|
|
15
14
|
<% if flash[:alert] %>
|
|
16
15
|
<%= flash[:alert] %>
|
|
17
16
|
<% end %>
|
|
18
|
-
<%= link_to "URL helper on application",
|
|
17
|
+
<%= link_to "Secret page(URL helper on application)", secret_page_path %>
|
|
19
18
|
<% if signed_in?(as: :user) %>
|
|
20
|
-
<%= link_to '
|
|
19
|
+
<%= link_to t('nav.nyauth.sessions.destroy'), session_path_for(:user), class: 'pure-menu-link', method: :delete %>
|
|
21
20
|
<% end %>
|
|
22
21
|
<% if signed_in?(as: :admin) %>
|
|
23
|
-
<%= link_to '
|
|
22
|
+
<%= link_to t('nav.nyauth.sessions.destroy'), session_path_for(:admin), class: 'pure-menu-link', method: :delete %>
|
|
24
23
|
<% end %>
|
|
24
|
+
|
|
25
|
+
<%= yield %>
|
|
25
26
|
</body>
|
|
26
27
|
</html>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
<p>
|
|
2
|
+
It's a secret page!
|
|
3
|
+
</p>
|
|
4
|
+
|
|
5
|
+
<ul>
|
|
6
|
+
<li>
|
|
7
|
+
<%= link_to new_confirmation_request_path_for(nyauth_client_name) do %>
|
|
8
|
+
<%= t('nav.nyauth.confirmation_requests.new') %>
|
|
9
|
+
<% end %>
|
|
10
|
+
</li>
|
|
11
|
+
<li>
|
|
12
|
+
<%= link_to edit_password_path_for(nyauth_client_name) do %>
|
|
13
|
+
<%= t('nav.nyauth.passwords.edit') %>
|
|
14
|
+
<% end %>
|
|
15
|
+
</li>
|
|
16
|
+
</ul>
|
data/spec/dummy/config/routes.rb
CHANGED
|
Binary file
|
data/spec/dummy/db/test.sqlite3
CHANGED
|
Binary file
|