authentication-zero 2.8.2 → 2.8.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/authentication_zero/version.rb +1 -1
- data/lib/generators/authentication/templates/controllers/html/identity/emails_controller.rb.tt +1 -1
- data/lib/generators/authentication/templates/controllers/html/identity/password_resets_controller.rb.tt +1 -1
- data/lib/generators/authentication/templates/controllers/html/passwords_controller.rb.tt +1 -1
- data/lib/generators/authentication/templates/controllers/html/registrations_controller.rb.tt +1 -1
- data/lib/generators/authentication/templates/erb/identity/emails/edit.html.erb.tt +1 -1
- data/lib/generators/authentication/templates/erb/identity/password_resets/edit.html.erb.tt +1 -1
- data/lib/generators/authentication/templates/erb/passwords/edit.html.erb.tt +1 -1
- data/lib/generators/authentication/templates/erb/registrations/new.html.erb.tt +1 -1
- data/lib/generators/authentication/templates/test_unit/controllers/html/identity/emails_controller_test.rb.tt +2 -2
- data/lib/generators/authentication/templates/test_unit/controllers/html/identity/password_resets_controller_test.rb.tt +1 -1
- data/lib/generators/authentication/templates/test_unit/controllers/html/passwords_controller_test.rb.tt +2 -2
- data/lib/generators/authentication/templates/test_unit/controllers/html/registrations_controller_test.rb.tt +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7c761cc8c78b6706041724ca6313bb115f8263036a5d4ea94e50ea30c8928ebc
|
4
|
+
data.tar.gz: d9488244decbc2fbd95e4d46b6847d34b701b3f023c6bb37c26da19a67a7ab19
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9a09fd156b599aba36c0e27d6c96e07779fde672da91b2db7541d12ea2395f581114569f8036cd18cdf6a062d68b9cabacb543b76a5885aa4121a79768495831
|
7
|
+
data.tar.gz: bbdcd461f3effa96d83ffb631defa701eb4b174bc3ada9ce6782e906b136ed2c7d45f8f5c2b56b80d8caa95326f5fbcfa637759c44b3a731c356b3adef56b819
|
data/Gemfile.lock
CHANGED
@@ -37,7 +37,7 @@ class Identity::PasswordResetsController < ApplicationController
|
|
37
37
|
end
|
38
38
|
|
39
39
|
def <%= "#{singular_table_name}_params" %>
|
40
|
-
params.
|
40
|
+
params.permit(:password, :password_confirmation)
|
41
41
|
end
|
42
42
|
<% if options.lockable? %>
|
43
43
|
def require_locking
|
data/lib/generators/authentication/templates/controllers/html/registrations_controller.rb.tt
CHANGED
@@ -20,7 +20,7 @@ class RegistrationsController < ApplicationController
|
|
20
20
|
|
21
21
|
private
|
22
22
|
def <%= "#{singular_table_name}_params" %>
|
23
|
-
params.
|
23
|
+
params.permit(:email, :password, :password_confirmation)
|
24
24
|
end
|
25
25
|
|
26
26
|
def session_params
|
@@ -8,7 +8,7 @@
|
|
8
8
|
<p><%%= button_to "Re-send verification email", identity_email_verification_path %></p>
|
9
9
|
<%% end %>
|
10
10
|
|
11
|
-
<%%= form_with(
|
11
|
+
<%%= form_with(url: identity_email_path, method: :patch) do |form| %>
|
12
12
|
<%% if @<%= singular_table_name %>.errors.any? %>
|
13
13
|
<div style="color: red">
|
14
14
|
<h2><%%= pluralize(@<%= singular_table_name %>.errors.count, "error") %> prohibited this <%= singular_table_name %> from being saved:</h2>
|
@@ -1,6 +1,6 @@
|
|
1
1
|
<h1>Reset your password</h1>
|
2
2
|
|
3
|
-
<%%= form_with(
|
3
|
+
<%%= form_with(url: identity_password_reset_path, method: :patch) do |form| %>
|
4
4
|
<%% if @<%= singular_table_name %>.errors.any? %>
|
5
5
|
<div style="color: red">
|
6
6
|
<h2><%%= pluralize(@<%= singular_table_name %>.errors.count, "error") %> prohibited this <%= singular_table_name %> from being saved:</h2>
|
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
<h1>Change your password</h1>
|
4
4
|
|
5
|
-
<%%= form_with(
|
5
|
+
<%%= form_with(url: password_path, method: :patch) do |form| %>
|
6
6
|
<%% if @<%= singular_table_name %>.errors.any? %>
|
7
7
|
<div style="color: red">
|
8
8
|
<h2><%%= pluralize(@<%= singular_table_name %>.errors.count, "error") %> prohibited this <%= singular_table_name %> from being saved:</h2>
|
@@ -1,6 +1,6 @@
|
|
1
1
|
<h1>Sign up</h1>
|
2
2
|
|
3
|
-
<%%= form_with(
|
3
|
+
<%%= form_with(url: sign_up_path) do |form| %>
|
4
4
|
<%% if @<%= singular_table_name %>.errors.any? %>
|
5
5
|
<div style="color: red">
|
6
6
|
<h2><%%= pluralize(@<%= singular_table_name %>.errors.count, "error") %> prohibited this <%= singular_table_name %> from being saved:</h2>
|
@@ -18,14 +18,14 @@ class Identity::EmailsControllerTest < ActionDispatch::IntegrationTest
|
|
18
18
|
end
|
19
19
|
|
20
20
|
test "should update email" do
|
21
|
-
patch identity_email_url, params: {
|
21
|
+
patch identity_email_url, params: { email: "new_email@hey.com" }
|
22
22
|
assert_redirected_to root_url
|
23
23
|
end
|
24
24
|
|
25
25
|
test "should not update email without sudo" do
|
26
26
|
@<%= singular_table_name %>.sessions.last.update! sudo_at: 1.day.ago
|
27
27
|
|
28
|
-
patch identity_email_url, params: {
|
28
|
+
patch identity_email_url, params: { email: "new_email@hey.com" }
|
29
29
|
assert_redirected_to new_sessions_sudo_url(proceed_to_url: identity_email_url)
|
30
30
|
end
|
31
31
|
|
@@ -49,7 +49,7 @@ class Identity::PasswordResetsControllerTest < ActionDispatch::IntegrationTest
|
|
49
49
|
end
|
50
50
|
|
51
51
|
test "should update password" do
|
52
|
-
patch identity_password_reset_url, params: { token: @sid,
|
52
|
+
patch identity_password_reset_url, params: { token: @sid, password: "Secret6*4*2*", password_confirmation: "Secret6*4*2*" }
|
53
53
|
assert_redirected_to sign_in_url
|
54
54
|
end
|
55
55
|
|
@@ -11,12 +11,12 @@ class PasswordsControllerTest < ActionDispatch::IntegrationTest
|
|
11
11
|
end
|
12
12
|
|
13
13
|
test "should update password" do
|
14
|
-
patch password_url, params: { current_password: "Secret1*3*5*",
|
14
|
+
patch password_url, params: { current_password: "Secret1*3*5*", password: "Secret6*4*2*", password_confirmation: "Secret6*4*2*" }
|
15
15
|
assert_redirected_to root_url
|
16
16
|
end
|
17
17
|
|
18
18
|
test "should not update password with wrong current password" do
|
19
|
-
patch password_url, params: { current_password: "SecretWrong1*3",
|
19
|
+
patch password_url, params: { current_password: "SecretWrong1*3", password: "Secret6*4*2*", password_confirmation: "Secret6*4*2*" }
|
20
20
|
|
21
21
|
assert_redirected_to edit_password_url
|
22
22
|
assert_equal "The current password you entered is incorrect", flash[:alert]
|
@@ -8,7 +8,7 @@ class RegistrationsControllerTest < ActionDispatch::IntegrationTest
|
|
8
8
|
|
9
9
|
test "should sign up" do
|
10
10
|
assert_difference("<%= class_name %>.count") do
|
11
|
-
post sign_up_url, params: {
|
11
|
+
post sign_up_url, params: { email: "lazaronixon@hey.com", password: "Secret1*3*5*", password_confirmation: "Secret1*3*5*" }, headers: { "User-Agent" => "Firefox" }
|
12
12
|
end
|
13
13
|
|
14
14
|
assert_redirected_to root_url
|