minimalist_authentication 3.4.1 → 3.4.2
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/app/controllers/password_resets_controller.rb +1 -1
- data/app/helpers/minimalist_authentication/application_helper.rb +9 -1
- data/app/views/email_verifications/_unverified.html.erb +1 -0
- data/app/views/email_verifications/_verified.html.erb +1 -0
- data/app/views/email_verifications/new.html.erb +6 -4
- data/app/views/email_verifications/show.html.erb +3 -7
- data/config/locales/minimalist_authentication.en.yml +8 -1
- data/lib/minimalist_authentication/user.rb +8 -3
- data/lib/minimalist_authentication/version.rb +1 -1
- metadata +33 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 81a22051077302595ad7912895d76c53f850e9b29e1dab723fdae137fefea9ac
|
|
4
|
+
data.tar.gz: 6c5343b7605ca25829c7744ffff968389d8cf306dd3bb4fe7d368ed226e87995
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 0b6b0e178491e11fc0337068aa5c21b02644ec716fd5d8818f9d0598e40cc6d476f3285f8ef8d8c193f0342debd32460edca76d578d27e16f79d5ea333a36389
|
|
7
|
+
data.tar.gz: 53f72000d43f6620d061f96c65274dc710a853f8ec58ebcd1cc42f46d95de31c4ff989d635077b0315baeb539d2a653dcd68c0335e940c71631884e3572136cf
|
|
@@ -30,6 +30,10 @@ module MinimalistAuthentication
|
|
|
30
30
|
)
|
|
31
31
|
end
|
|
32
32
|
|
|
33
|
+
def ma_email_verification_button(**)
|
|
34
|
+
button_to(t(".button"), email_verification_path, **)
|
|
35
|
+
end
|
|
36
|
+
|
|
33
37
|
def ma_forgot_password_link
|
|
34
38
|
link_to(t(".forgot_password"), new_password_reset_path)
|
|
35
39
|
end
|
|
@@ -40,7 +44,7 @@ module MinimalistAuthentication
|
|
|
40
44
|
options.reverse_merge(
|
|
41
45
|
autocomplete: "new-password",
|
|
42
46
|
minlength: MinimalistAuthentication.user_model.password_minimum,
|
|
43
|
-
placeholder:
|
|
47
|
+
placeholder: "New password",
|
|
44
48
|
required: true
|
|
45
49
|
)
|
|
46
50
|
)
|
|
@@ -72,5 +76,9 @@ module MinimalistAuthentication
|
|
|
72
76
|
)
|
|
73
77
|
)
|
|
74
78
|
end
|
|
79
|
+
|
|
80
|
+
def ma_verification_message(user = current_user)
|
|
81
|
+
render(user.email_verified? ? "verified" : "unverified")
|
|
82
|
+
end
|
|
75
83
|
end
|
|
76
84
|
end
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<h2><%= t(".message") %></h2>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<h2><%= t(".message") %></h2>
|
|
@@ -1,12 +1,14 @@
|
|
|
1
|
-
<
|
|
1
|
+
<h1><%= t(".title") %></h1>
|
|
2
|
+
|
|
3
|
+
<h2><%= t(".instructions") %></h2>
|
|
4
|
+
|
|
5
|
+
<p><%= t(".message") %></p>
|
|
2
6
|
|
|
3
7
|
<p>
|
|
4
8
|
<strong><%= current_user.email %></strong>
|
|
5
9
|
<em><%= ma_change_email_link %></em>
|
|
6
10
|
</p>
|
|
7
11
|
|
|
8
|
-
<%=
|
|
9
|
-
|
|
10
|
-
<p><%= t(".message") %></p>
|
|
12
|
+
<%= ma_email_verification_button %>
|
|
11
13
|
|
|
12
14
|
<%= ma_skip_link %>
|
|
@@ -1,10 +1,6 @@
|
|
|
1
|
-
<h1
|
|
1
|
+
<h1><%= t(".title") %></h1>
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
<% else %>
|
|
6
|
-
<h2>Email address verification failed</h2>
|
|
7
|
-
<% end %>
|
|
8
|
-
<h2><%= current_user.email %></h2>
|
|
3
|
+
<%= ma_verification_message %>
|
|
4
|
+
<p><%= current_user.email %></p>
|
|
9
5
|
|
|
10
6
|
<%= link_to("Go to Dashboard", dashboard_path) %>
|
|
@@ -4,8 +4,15 @@ en:
|
|
|
4
4
|
notice: Verification email sent to %{email}, follow the instructions to complete verification. Thank you!
|
|
5
5
|
new:
|
|
6
6
|
button: Send Verification Email
|
|
7
|
+
instructions: Please verify your email address
|
|
7
8
|
message: Verifying your email will allow you to receive confidential messages.
|
|
8
|
-
title:
|
|
9
|
+
title: Email Verification
|
|
10
|
+
show:
|
|
11
|
+
title: Email Verification
|
|
12
|
+
unverified:
|
|
13
|
+
message: Email address verification failed
|
|
14
|
+
verified:
|
|
15
|
+
message: Your email address has been verified
|
|
9
16
|
emails:
|
|
10
17
|
edit:
|
|
11
18
|
instructions: Please update your email address
|
|
@@ -49,10 +49,15 @@ module MinimalistAuthentication
|
|
|
49
49
|
module ClassMethods
|
|
50
50
|
delegate :account_setup_duration, :password_reset_duration, to: "MinimalistAuthentication.configuration"
|
|
51
51
|
|
|
52
|
-
# Finds
|
|
53
|
-
# Returns nil if the user is not found or not enabled.
|
|
52
|
+
# Finds an enabled user by id.
|
|
54
53
|
def find_enabled(id)
|
|
55
|
-
|
|
54
|
+
find_enabled_by(id:) if id.present?
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
# Finds a user matching the specified conditions and returns the user if they are enabled.
|
|
58
|
+
# Returns nil if a user is not found or not enabled.
|
|
59
|
+
def find_enabled_by(**)
|
|
60
|
+
find_by(**)&.enabled
|
|
56
61
|
end
|
|
57
62
|
|
|
58
63
|
def inactive
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: minimalist_authentication
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 3.4.
|
|
4
|
+
version: 3.4.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Aaron Baldwin
|
|
@@ -10,6 +10,34 @@ bindir: bin
|
|
|
10
10
|
cert_chain: []
|
|
11
11
|
date: 1980-01-02 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
|
+
- !ruby/object:Gem::Dependency
|
|
14
|
+
name: actionmailer
|
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
|
16
|
+
requirements:
|
|
17
|
+
- - ">="
|
|
18
|
+
- !ruby/object:Gem::Version
|
|
19
|
+
version: 7.1.0
|
|
20
|
+
type: :runtime
|
|
21
|
+
prerelease: false
|
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
23
|
+
requirements:
|
|
24
|
+
- - ">="
|
|
25
|
+
- !ruby/object:Gem::Version
|
|
26
|
+
version: 7.1.0
|
|
27
|
+
- !ruby/object:Gem::Dependency
|
|
28
|
+
name: activerecord
|
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
|
30
|
+
requirements:
|
|
31
|
+
- - ">="
|
|
32
|
+
- !ruby/object:Gem::Version
|
|
33
|
+
version: 7.1.0
|
|
34
|
+
type: :runtime
|
|
35
|
+
prerelease: false
|
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
37
|
+
requirements:
|
|
38
|
+
- - ">="
|
|
39
|
+
- !ruby/object:Gem::Version
|
|
40
|
+
version: 7.1.0
|
|
13
41
|
- !ruby/object:Gem::Dependency
|
|
14
42
|
name: bcrypt
|
|
15
43
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -31,7 +59,7 @@ dependencies:
|
|
|
31
59
|
- !ruby/object:Gem::Version
|
|
32
60
|
version: 3.1.3
|
|
33
61
|
- !ruby/object:Gem::Dependency
|
|
34
|
-
name:
|
|
62
|
+
name: railties
|
|
35
63
|
requirement: !ruby/object:Gem::Requirement
|
|
36
64
|
requirements:
|
|
37
65
|
- - ">="
|
|
@@ -63,6 +91,8 @@ files:
|
|
|
63
91
|
- app/mailers/application_mailer.rb
|
|
64
92
|
- app/mailers/minimalist_authentication_mailer.rb
|
|
65
93
|
- app/validators/password_exclusivity_validator.rb
|
|
94
|
+
- app/views/email_verifications/_unverified.html.erb
|
|
95
|
+
- app/views/email_verifications/_verified.html.erb
|
|
66
96
|
- app/views/email_verifications/new.html.erb
|
|
67
97
|
- app/views/email_verifications/show.html.erb
|
|
68
98
|
- app/views/emails/edit.html.erb
|
|
@@ -112,7 +142,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
112
142
|
- !ruby/object:Gem::Version
|
|
113
143
|
version: '0'
|
|
114
144
|
requirements: []
|
|
115
|
-
rubygems_version:
|
|
145
|
+
rubygems_version: 4.0.2
|
|
116
146
|
specification_version: 4
|
|
117
147
|
summary: A Rails authentication plugin that takes a minimalist approach.
|
|
118
148
|
test_files: []
|