alchemy-devise 4.3.1 → 4.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/controllers/alchemy/admin/users_controller.rb +2 -3
- data/app/models/alchemy/user.rb +0 -8
- data/app/views/alchemy/admin/users/_fields.html.erb +0 -4
- data/config/initializers/alchemy.rb +6 -0
- data/db/migrate/20131015124700_create_alchemy_users.rb +0 -1
- data/lib/alchemy/devise/version.rb +1 -1
- metadata +8 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7e352204aef8262b7a4b3cffe5ef3e7a58781194d777a481c3b99300f92499d6
|
4
|
+
data.tar.gz: 6fa7ec4f94b5333fe8cad0897f821d80fedb297f932f4d904cbd4eeecce5cd2b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2b6ac50b6a59132a6232a481da65290dc7500f7ab44397cfce25df98ef28d2609340e65edc190d9dca48e74409b5a3eb394aa5f015f8e72f134fcb2b0d1f025c
|
7
|
+
data.tar.gz: bba4952131d61b8f33ec9670ffa9a2178ebe6095e52453f27e2c604b0918d9b528fd09d1f32a3f7d8a2a7896525b1f85004b695c04b0687a4a3066516a761cfe
|
@@ -2,7 +2,7 @@ module Alchemy
|
|
2
2
|
module Admin
|
3
3
|
class UsersController < ResourcesController
|
4
4
|
|
5
|
-
before_action :
|
5
|
+
before_action :set_roles, except: [:index, :destroy]
|
6
6
|
|
7
7
|
load_and_authorize_resource class: Alchemy::User,
|
8
8
|
only: [:edit, :update, :destroy]
|
@@ -67,13 +67,12 @@ module Alchemy
|
|
67
67
|
|
68
68
|
private
|
69
69
|
|
70
|
-
def
|
70
|
+
def set_roles
|
71
71
|
if can_update_role?
|
72
72
|
@user_roles = User::ROLES.map do |role|
|
73
73
|
[User.human_rolename(role), role]
|
74
74
|
end
|
75
75
|
end
|
76
|
-
@user_genders = User.genders_for_select
|
77
76
|
end
|
78
77
|
|
79
78
|
def user_params
|
data/app/models/alchemy/user.rb
CHANGED
@@ -8,7 +8,6 @@ module Alchemy
|
|
8
8
|
:lastname,
|
9
9
|
:login,
|
10
10
|
:email,
|
11
|
-
:gender,
|
12
11
|
:language,
|
13
12
|
:password,
|
14
13
|
:password_confirmation,
|
@@ -41,13 +40,6 @@ module Alchemy
|
|
41
40
|
Alchemy.t("user_roles.#{role}")
|
42
41
|
end
|
43
42
|
|
44
|
-
def genders_for_select
|
45
|
-
[
|
46
|
-
[Alchemy.t('male'), 'male'],
|
47
|
-
[Alchemy.t('female'), 'female']
|
48
|
-
]
|
49
|
-
end
|
50
|
-
|
51
43
|
def logged_in_timeout
|
52
44
|
Config.get(:auto_logout_time).minutes.to_i
|
53
45
|
end
|
@@ -18,3 +18,9 @@ Alchemy.user_class_name = 'Alchemy::User'
|
|
18
18
|
Alchemy.signup_path = '/admin/signup'
|
19
19
|
Alchemy.login_path = '/admin/login'
|
20
20
|
Alchemy.logout_path = '/admin/logout'
|
21
|
+
|
22
|
+
if Alchemy.respond_to?(:logout_method)
|
23
|
+
Rails.application.config.after_initialize do
|
24
|
+
Alchemy.logout_method = Devise.sign_out_via
|
25
|
+
end
|
26
|
+
end
|
@@ -6,7 +6,6 @@ class CreateAlchemyUsers < ActiveRecord::Migration[4.2]
|
|
6
6
|
t.string "lastname"
|
7
7
|
t.string "login"
|
8
8
|
t.string "email"
|
9
|
-
t.string "gender"
|
10
9
|
t.string "language"
|
11
10
|
t.string "encrypted_password", limit: 128, default: "", null: false
|
12
11
|
t.string "password_salt", limit: 128, default: "", null: false
|
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.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Thomas von Deyen
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-01-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: alchemy_cms
|
@@ -16,20 +16,20 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 4.1.0
|
19
|
+
version: 4.1.0
|
20
20
|
- - "<"
|
21
21
|
- !ruby/object:Gem::Version
|
22
|
-
version: '
|
22
|
+
version: '5.1'
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
26
26
|
requirements:
|
27
27
|
- - ">="
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
version: 4.1.0
|
29
|
+
version: 4.1.0
|
30
30
|
- - "<"
|
31
31
|
- !ruby/object:Gem::Version
|
32
|
-
version: '
|
32
|
+
version: '5.1'
|
33
33
|
- !ruby/object:Gem::Dependency
|
34
34
|
name: devise
|
35
35
|
requirement: !ruby/object:Gem::Requirement
|
@@ -39,7 +39,7 @@ dependencies:
|
|
39
39
|
version: 4.7.1
|
40
40
|
- - "<"
|
41
41
|
- !ruby/object:Gem::Version
|
42
|
-
version: '
|
42
|
+
version: '5'
|
43
43
|
type: :runtime
|
44
44
|
prerelease: false
|
45
45
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -49,7 +49,7 @@ dependencies:
|
|
49
49
|
version: 4.7.1
|
50
50
|
- - "<"
|
51
51
|
- !ruby/object:Gem::Version
|
52
|
-
version: '
|
52
|
+
version: '5'
|
53
53
|
- !ruby/object:Gem::Dependency
|
54
54
|
name: capybara
|
55
55
|
requirement: !ruby/object:Gem::Requirement
|