alchemy-devise 4.5.0 → 4.6.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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6217ebc5ce12c866ae9b27e1d80a181c302e96f0accced11e0ef9a3df2fdc4be
|
4
|
+
data.tar.gz: c05e0c5d4a260926f293073c00d440b9968dba46a10ea0326f4068ee19065bff
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0dc57c2c68c836f3ce8f7f1e8c029dc8a8e6ff5ade4a052e1d0b99dcd1cd901d08215b22d046da3d089a950a8b18c5b0d69a95d665ae70803d559bb3040ccdcd
|
7
|
+
data.tar.gz: 033e220a727c0727975b90df7c589b2ecb4a9aefd8bc90e37046ce63be666cebf47a5583780fad2afab4ceffb12aa953aae4c134a4d6aee05a92fa955abbc6d5
|
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
## Devise based authentication for AlchemyCMS
|
1
|
+
## Devise based authentication for AlchemyCMS
|
2
2
|
|
3
3
|
[](http://travis-ci.org/AlchemyCMS/alchemy-devise)
|
4
4
|
|
@@ -12,7 +12,7 @@ Just put the gem into your projects `Gemfile`.
|
|
12
12
|
|
13
13
|
```ruby
|
14
14
|
# Gemfile
|
15
|
-
gem 'alchemy-devise'
|
15
|
+
gem 'alchemy-devise'
|
16
16
|
```
|
17
17
|
|
18
18
|
and run `bundle install`.
|
data/Rakefile
CHANGED
@@ -33,7 +33,9 @@ namespace :alchemy do
|
|
33
33
|
system <<-BASH
|
34
34
|
cd spec/dummy
|
35
35
|
export RAILS_ENV=test
|
36
|
-
bin/rake
|
36
|
+
bin/rake railties:install:migrations
|
37
|
+
bin/rake db:drop db:create db:migrate
|
38
|
+
bin/rails g alchemy:install --force
|
37
39
|
bin/rails g alchemy:devise:install --force
|
38
40
|
cd -
|
39
41
|
BASH
|
@@ -3,11 +3,13 @@ module Alchemy
|
|
3
3
|
class PasswordsController < ::Devise::PasswordsController
|
4
4
|
include Alchemy::Admin::Locale
|
5
5
|
|
6
|
-
|
6
|
+
if Alchemy.gem_version <= Gem::Version.new("4.9")
|
7
|
+
before_action { enforce_ssl if ssl_required? && !request.ssl? }
|
8
|
+
end
|
7
9
|
|
8
|
-
helper
|
10
|
+
helper "Alchemy::Admin::Base"
|
9
11
|
|
10
|
-
layout
|
12
|
+
layout "alchemy/admin"
|
11
13
|
|
12
14
|
private
|
13
15
|
|
@@ -16,7 +18,7 @@ module Alchemy
|
|
16
18
|
alchemy.admin_login_path
|
17
19
|
end
|
18
20
|
|
19
|
-
def admin_edit_password_url(
|
21
|
+
def admin_edit_password_url(_resource, options = {})
|
20
22
|
alchemy.admin_edit_password_url(options)
|
21
23
|
end
|
22
24
|
|
@@ -27,7 +29,6 @@ module Alchemy
|
|
27
29
|
alchemy.root_path
|
28
30
|
end
|
29
31
|
end
|
30
|
-
|
31
32
|
end
|
32
33
|
end
|
33
34
|
end
|
@@ -1,3 +1,7 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_dependency "alchemy/version"
|
4
|
+
|
1
5
|
module Alchemy
|
2
6
|
module Admin
|
3
7
|
class UserSessionsController < ::Devise::SessionsController
|
@@ -5,15 +9,16 @@ module Alchemy
|
|
5
9
|
|
6
10
|
protect_from_forgery prepend: true
|
7
11
|
|
8
|
-
|
9
|
-
|
12
|
+
if Alchemy.gem_version <= Gem::Version.new("4.9")
|
13
|
+
before_action except: "destroy" do
|
14
|
+
enforce_ssl if ssl_required? && !request.ssl?
|
15
|
+
end
|
10
16
|
end
|
11
|
-
|
12
17
|
before_action :check_user_count, :only => :new
|
13
18
|
|
14
|
-
helper
|
19
|
+
helper "Alchemy::Admin::Base"
|
15
20
|
|
16
|
-
layout
|
21
|
+
layout "alchemy/admin"
|
17
22
|
|
18
23
|
def create
|
19
24
|
authenticate_user!
|
@@ -23,10 +28,10 @@ module Alchemy
|
|
23
28
|
redirect_path = admin_dashboard_path
|
24
29
|
else
|
25
30
|
# We have to strip double slashes from beginning of path, because of strange rails/rack bug.
|
26
|
-
redirect_path = session[:redirect_path].gsub(/\A\/{2,}/,
|
31
|
+
redirect_path = session[:redirect_path].gsub(/\A\/{2,}/, "/")
|
27
32
|
end
|
28
33
|
redirect_to redirect_path,
|
29
|
-
notice: t(:signed_in, scope:
|
34
|
+
notice: t(:signed_in, scope: "devise.sessions")
|
30
35
|
else
|
31
36
|
super
|
32
37
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: alchemy-devise
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.
|
4
|
+
version: 4.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Thomas von Deyen
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-10-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: alchemy_cms
|
@@ -211,7 +211,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
211
211
|
version: '0'
|
212
212
|
requirements: []
|
213
213
|
rubygems_version: 3.0.3
|
214
|
-
signing_key:
|
214
|
+
signing_key:
|
215
215
|
specification_version: 4
|
216
216
|
summary: Devise based user authentication for AlchemyCMS.
|
217
217
|
test_files: []
|
218
|
+
...
|