alchemy-devise 7.4.0 → 8.0.0.b
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/CHANGELOG.md +7 -0
- data/README.md +2 -2
- data/app/assets/builds/alchemy-devise.css +1 -1
- data/app/assets/builds/alchemy-devise.css.map +1 -1
- data/app/assets/stylesheets/alchemy-devise/login.scss +3 -0
- data/app/mailers/alchemy/notifications.rb +1 -1
- data/app/models/alchemy/user.rb +2 -2
- data/app/patches/controllers/alchemy/devise/base_controller_patch.rb +20 -0
- data/app/views/alchemy/admin/users/index.html.erb +1 -1
- data/config/initializers/alchemy.rb +1 -1
- data/lib/alchemy/devise/engine.rb +3 -4
- data/lib/alchemy/devise/version.rb +1 -1
- data/lib/generators/alchemy/devise/install/templates/devise.rb.tt +2 -2
- metadata +30 -10
- data/app/controllers/alchemy/base_controller_extension.rb +0 -18
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3c1338a60cd662f003273c43a2389f1138c7c889909fc0aaf8ddb7ee6ab59812
|
4
|
+
data.tar.gz: a86d926627ab17965deb01378a3d67e872a3b042fee0e1340290702bb0b19229
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 184e26ecc9d543c34db5aaa90aa83ab7d37b21113bd33af9878cc6e5bf5bf1e441914029198a4233f6b68d6eb5bc0c9bb6b6ab26e9cf2aaa9cf5f736590944be
|
7
|
+
data.tar.gz: 6e49acd84dc13aa600b75b3eaaacfc71498375f4fb7363c37bba61bfc8f4267efd02f87f750f2abbf109c5dfd5eed29abd7a648beb0d22017c352e678c8e08c3
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,12 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## 7.4.1 (2025-02-12)
|
4
|
+
|
5
|
+
- Fix module icon for Alchemy 7.4 [#224](https://github.com/AlchemyCMS/alchemy-devise/pull/224) ([tvdeyen](https://github.com/tvdeyen))
|
6
|
+
- Update sqlite3 requirement from ~> 1.4 to ~> 2.5 [#223](https://github.com/AlchemyCMS/alchemy-devise/pull/223) ([dependabot](https://github.com/apps/dependabot))
|
7
|
+
- Update rspec-rails requirement from ~> 6.0 to ~> 7.1 [#222](https://github.com/AlchemyCMS/alchemy-devise/pull/222) ([dependabot](https://github.com/apps/dependabot))
|
8
|
+
- Enable dependabot version updates [#221](https://github.com/AlchemyCMS/alchemy-devise/pull/221) ([tvdeyen](https://github.com/tvdeyen))
|
9
|
+
|
3
10
|
## 7.4.0 (2025-01-21)
|
4
11
|
|
5
12
|
- Extend test matrix [#219](https://github.com/AlchemyCMS/alchemy-devise/pull/219) ([mamhoff](https://github.com/mamhoff))
|
data/README.md
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
## Devise based authentication for AlchemyCMS
|
2
2
|
|
3
|
-
[](https://github.com/AlchemyCMS/alchemy-devise/actions/workflows/ci.yml)
|
4
4
|
[](https://github.com/AlchemyCMS/alchemy-devise/actions/workflows/brakeman-analysis.yml)
|
5
5
|
|
6
|
-
[](http://badge.fury.io/rb/alchemy-devise) [](http://badge.fury.io/rb/alchemy-devise) [](https://codecov.io/gh/AlchemyCMS/alchemy-devise)
|
7
7
|
|
8
8
|
AlchemyCMS has no authentication in its core. So it is possible to bring your own authentication and use it to authorize users in AlchemyCMS. If you don't have your own authentication, you can use this gem.
|
9
9
|
|
@@ -1 +1 @@
|
|
1
|
-
body.user_sessions,body.passwords{background-color:var(--color-blue_dark);color:var(--color-white)}body.user_sessions a,body.passwords a{color:var(--color-white)}body.user_sessions #errors,body.user_sessions .message.info,body.passwords #errors,body.passwords .message.info{border-color:rgba(0,0,0,0)}body.user_sessions #errors,body.passwords #errors{margin-left:157px}#logo{width:275px;height:auto;margin:0 0 1em 164px}.login_signup_box{position:absolute;width:450px;top:50%;left:50%;transform:translate(-60%, -50%)}.no-js .login_signup_box{display:none}.login_signup_box .message{margin-left:157px}.login_signup_box .link{text-align:right}.login_signup_box button.secondary{color:var(--color-white);border-color:var(--color-white)}
|
1
|
+
body.user_sessions,body.passwords{background-color:var(--color-blue_dark);color:var(--color-white)}body.user_sessions a,body.passwords a{color:var(--color-white)}body.user_sessions #errors,body.user_sessions .message.info,body.passwords #errors,body.passwords .message.info{border-color:rgba(0,0,0,0)}body.user_sessions #errors,body.passwords #errors{margin-left:157px}#logo{width:275px;height:auto;margin:0 0 1em 164px}.login_signup_box{position:absolute;width:450px;top:50%;left:50%;transform:translate(-60%, -50%);--form-field-label-color: var(--color-white);--button-secondary-bg-color: var(--color-blue_dark);--button-secondary-hover-bg-color: var(--color-blue_medium)}.no-js .login_signup_box{display:none}.login_signup_box .message{margin-left:157px}.login_signup_box .link{text-align:right}.login_signup_box button.secondary{color:var(--color-white);border-color:var(--color-white)}/*# sourceMappingURL=alchemy-devise.css.map */
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sourceRoot":"","sources":["../stylesheets/alchemy-devise/login.scss"
|
1
|
+
{"version":3,"sourceRoot":"","sources":["../stylesheets/alchemy-devise/login.scss"],"names":[],"mappings":"AAAA,kCAEE,wCACA,yBAEA,sCACE,yBAGF,gHAEE,2BAGF,kDACE,kBAIJ,MACE,YACA,YACA,qBAGF,kBACE,kBACA,YACA,QACA,SACA,gCACA,6CACA,oDACA,4DAEA,yBACE,aAGF,2BACE,kBAGF,wBACE,iBAGF,mCACE,yBACA","file":"alchemy-devise.css"}
|
@@ -29,6 +29,9 @@ body.passwords {
|
|
29
29
|
top: 50%;
|
30
30
|
left: 50%;
|
31
31
|
transform: translate(-60%, -50%);
|
32
|
+
--form-field-label-color: var(--color-white);
|
33
|
+
--button-secondary-bg-color: var(--color-blue_dark);
|
34
|
+
--button-secondary-hover-bg-color: var(--color-blue_medium);
|
32
35
|
|
33
36
|
.no-js & {
|
34
37
|
display: none;
|
data/app/models/alchemy/user.rb
CHANGED
@@ -35,7 +35,7 @@ module Alchemy
|
|
35
35
|
scope :logged_in, -> { where("last_request_at > ?", logged_in_timeout.seconds.ago) }
|
36
36
|
scope :logged_out, -> { where("last_request_at is NULL or last_request_at <= ?", logged_in_timeout.seconds.ago) }
|
37
37
|
|
38
|
-
ROLES =
|
38
|
+
ROLES = Alchemy.config.user_roles
|
39
39
|
|
40
40
|
class << self
|
41
41
|
def ransackable_attributes(_auth_object = nil)
|
@@ -65,7 +65,7 @@ module Alchemy
|
|
65
65
|
end
|
66
66
|
|
67
67
|
def logged_in_timeout
|
68
|
-
|
68
|
+
Alchemy.config.get(:auto_logout_time).minutes.to_i
|
69
69
|
end
|
70
70
|
end
|
71
71
|
|
@@ -0,0 +1,20 @@
|
|
1
|
+
module Alchemy
|
2
|
+
module Devise
|
3
|
+
module BaseControllerPatch
|
4
|
+
def self.prepended(base)
|
5
|
+
base.before_action(:store_user_request_time)
|
6
|
+
end
|
7
|
+
|
8
|
+
private
|
9
|
+
|
10
|
+
# Stores the users request time.
|
11
|
+
def store_user_request_time
|
12
|
+
if alchemy_user_signed_in?
|
13
|
+
current_alchemy_user.store_request_time!
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
17
|
+
Alchemy::BaseController.prepend self
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
@@ -1,9 +1,12 @@
|
|
1
1
|
require "alchemy_cms"
|
2
2
|
require "devise"
|
3
|
+
require "flickwerk"
|
3
4
|
|
4
5
|
module Alchemy
|
5
6
|
module Devise
|
6
7
|
class Engine < ::Rails::Engine
|
8
|
+
include Flickwerk
|
9
|
+
|
7
10
|
isolate_namespace Alchemy
|
8
11
|
engine_name "alchemy_devise"
|
9
12
|
|
@@ -16,10 +19,6 @@ module Alchemy
|
|
16
19
|
"alchemy-devise.css"
|
17
20
|
]
|
18
21
|
end
|
19
|
-
|
20
|
-
config.to_prepare do
|
21
|
-
require_relative "../../../app/controllers/alchemy/base_controller_extension"
|
22
|
-
end
|
23
22
|
end
|
24
23
|
end
|
25
24
|
end
|
@@ -24,7 +24,7 @@ Devise.setup do |config|
|
|
24
24
|
# Configure the e-mail address which will be shown in Devise::Mailer,
|
25
25
|
# note that it will be overwritten if you use your own mailer class
|
26
26
|
# with default "from" parameter.
|
27
|
-
config.mailer_sender = Alchemy
|
27
|
+
config.mailer_sender = Alchemy.config.mailer.mail_from
|
28
28
|
|
29
29
|
# Configure the class responsible to send e-mails.
|
30
30
|
config.mailer = "Alchemy::Notifications"
|
@@ -188,7 +188,7 @@ Devise.setup do |config|
|
|
188
188
|
# ==> Configuration for :timeoutable
|
189
189
|
# The time you want to timeout the user session without activity. After this
|
190
190
|
# time the user will be asked for credentials again. Default is 30 minutes.
|
191
|
-
config.timeout_in = Rails.env.development? ? nil : Alchemy
|
191
|
+
config.timeout_in = Rails.env.development? ? nil : Alchemy.config.auto_logout_time.minutes
|
192
192
|
|
193
193
|
# ==> Configuration for :lockable
|
194
194
|
# Defines which strategy will be used to lock an account.
|
metadata
CHANGED
@@ -1,28 +1,34 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: alchemy-devise
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 8.0.0.b
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Thomas von Deyen
|
8
8
|
bindir: bin
|
9
9
|
cert_chain: []
|
10
|
-
date:
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
11
11
|
dependencies:
|
12
12
|
- !ruby/object:Gem::Dependency
|
13
13
|
name: alchemy_cms
|
14
14
|
requirement: !ruby/object:Gem::Requirement
|
15
15
|
requirements:
|
16
|
-
- - "
|
16
|
+
- - ">="
|
17
|
+
- !ruby/object:Gem::Version
|
18
|
+
version: 8.0.0.a
|
19
|
+
- - "<"
|
17
20
|
- !ruby/object:Gem::Version
|
18
|
-
version: '
|
21
|
+
version: '9.0'
|
19
22
|
type: :runtime
|
20
23
|
prerelease: false
|
21
24
|
version_requirements: !ruby/object:Gem::Requirement
|
22
25
|
requirements:
|
23
|
-
- - "
|
26
|
+
- - ">="
|
24
27
|
- !ruby/object:Gem::Version
|
25
|
-
version:
|
28
|
+
version: 8.0.0.a
|
29
|
+
- - "<"
|
30
|
+
- !ruby/object:Gem::Version
|
31
|
+
version: '9.0'
|
26
32
|
- !ruby/object:Gem::Dependency
|
27
33
|
name: devise
|
28
34
|
requirement: !ruby/object:Gem::Requirement
|
@@ -37,6 +43,20 @@ dependencies:
|
|
37
43
|
- - "~>"
|
38
44
|
- !ruby/object:Gem::Version
|
39
45
|
version: '4.9'
|
46
|
+
- !ruby/object:Gem::Dependency
|
47
|
+
name: flickwerk
|
48
|
+
requirement: !ruby/object:Gem::Requirement
|
49
|
+
requirements:
|
50
|
+
- - "~>"
|
51
|
+
- !ruby/object:Gem::Version
|
52
|
+
version: 0.3.6
|
53
|
+
type: :runtime
|
54
|
+
prerelease: false
|
55
|
+
version_requirements: !ruby/object:Gem::Requirement
|
56
|
+
requirements:
|
57
|
+
- - "~>"
|
58
|
+
- !ruby/object:Gem::Version
|
59
|
+
version: 0.3.6
|
40
60
|
- !ruby/object:Gem::Dependency
|
41
61
|
name: capybara
|
42
62
|
requirement: !ruby/object:Gem::Requirement
|
@@ -99,14 +119,14 @@ dependencies:
|
|
99
119
|
requirements:
|
100
120
|
- - "~>"
|
101
121
|
- !ruby/object:Gem::Version
|
102
|
-
version: '
|
122
|
+
version: '8.0'
|
103
123
|
type: :development
|
104
124
|
prerelease: false
|
105
125
|
version_requirements: !ruby/object:Gem::Requirement
|
106
126
|
requirements:
|
107
127
|
- - "~>"
|
108
128
|
- !ruby/object:Gem::Version
|
109
|
-
version: '
|
129
|
+
version: '8.0'
|
110
130
|
- !ruby/object:Gem::Dependency
|
111
131
|
name: simplecov
|
112
132
|
requirement: !ruby/object:Gem::Requirement
|
@@ -138,9 +158,9 @@ files:
|
|
138
158
|
- app/controllers/alchemy/admin/passwords_controller.rb
|
139
159
|
- app/controllers/alchemy/admin/user_sessions_controller.rb
|
140
160
|
- app/controllers/alchemy/admin/users_controller.rb
|
141
|
-
- app/controllers/alchemy/base_controller_extension.rb
|
142
161
|
- app/mailers/alchemy/notifications.rb
|
143
162
|
- app/models/alchemy/user.rb
|
163
|
+
- app/patches/controllers/alchemy/devise/base_controller_patch.rb
|
144
164
|
- app/views/alchemy/admin/passwords/edit.html.erb
|
145
165
|
- app/views/alchemy/admin/passwords/new.html.erb
|
146
166
|
- app/views/alchemy/admin/user_sessions/new.html.erb
|
@@ -199,7 +219,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
199
219
|
- !ruby/object:Gem::Version
|
200
220
|
version: '0'
|
201
221
|
requirements: []
|
202
|
-
rubygems_version: 3.
|
222
|
+
rubygems_version: 3.7.2
|
203
223
|
specification_version: 4
|
204
224
|
summary: Devise based user authentication for AlchemyCMS.
|
205
225
|
test_files: []
|
@@ -1,18 +0,0 @@
|
|
1
|
-
module Alchemy
|
2
|
-
module BaseControllerExtension
|
3
|
-
def self.prepended(base)
|
4
|
-
base.before_action(:store_user_request_time)
|
5
|
-
end
|
6
|
-
|
7
|
-
private
|
8
|
-
|
9
|
-
# Stores the users request time.
|
10
|
-
def store_user_request_time
|
11
|
-
if alchemy_user_signed_in?
|
12
|
-
current_alchemy_user.store_request_time!
|
13
|
-
end
|
14
|
-
end
|
15
|
-
end
|
16
|
-
end
|
17
|
-
|
18
|
-
Alchemy::BaseController.prepend Alchemy::BaseControllerExtension
|