thecore_ui_rails_admin 3.0.19 → 3.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/config/initializers/concern_user.rb +18 -43
- data/config/locales/en.main.yml +3 -3
- data/config/locales/it.main.yml +2 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c7951663f1f903cad6c911ce8e22c4e8dedfa818ecc0caf3bbd5c84efb848f0f
|
4
|
+
data.tar.gz: 7513283285501954b0b83c538d3a00066b9b0079b98d64af7f2ee61abfd8f802
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 808ab00cbd3c999d14a154c6976d62734782837a84f174fb3c08fed242fdd1bcbec2a51d7901107b7e7ec7d8dc7123031fd9b200aa4d0550e31f33cb19ce1a79
|
7
|
+
data.tar.gz: f6d7dd9ad71727ce6c9eb97dab5cb585c62447ac4058c88a3a58cddd3edddc6d27024487785631bd9e009368965f1319160c53a3667f4480f04c1ead1ae8dc0e
|
@@ -5,6 +5,14 @@ module ThecoreUiRailsAdminUserConcern
|
|
5
5
|
extend ActiveSupport::Concern
|
6
6
|
|
7
7
|
included do
|
8
|
+
|
9
|
+
def admin_enum
|
10
|
+
[["✔",true],['✘',false]]
|
11
|
+
end
|
12
|
+
|
13
|
+
def locked_enum
|
14
|
+
[["✔",true],['✘',false]]
|
15
|
+
end
|
8
16
|
|
9
17
|
rails_admin do
|
10
18
|
# rails_admin do
|
@@ -13,57 +21,24 @@ module ThecoreUiRailsAdminUserConcern
|
|
13
21
|
parent Role
|
14
22
|
desc I18n.t("activerecord.descriptions.user")
|
15
23
|
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
visible do
|
22
|
-
bindings[:view].current_user.admin? && bindings[:view].current_user.id != bindings[:object].id rescue false
|
24
|
+
exclude_fields :id, :remember_created_at, :sign_in_count, :current_sign_in_at, :last_sign_in_at, :current_sign_in_ip, :last_sign_in_ip, :lock_version, :role_users
|
25
|
+
|
26
|
+
edit do
|
27
|
+
configure :password do
|
28
|
+
required false
|
23
29
|
end
|
24
|
-
|
25
|
-
|
26
|
-
visible do
|
27
|
-
bindings[:view].current_user.admin? && bindings[:view].current_user.id != bindings[:object].id rescue false
|
30
|
+
configure :password_confirmation do
|
31
|
+
required false
|
28
32
|
end
|
29
33
|
end
|
30
|
-
|
31
|
-
|
32
|
-
# Fields only in lists and forms
|
33
|
-
list do
|
34
|
-
field :created_at
|
35
|
-
exclude_fields :lock_version
|
36
|
-
# include UserRailsAdminListConcern
|
37
|
-
end
|
38
|
-
show do
|
39
|
-
#exclude_fields :id
|
40
|
-
exclude_fields :lock_version
|
41
|
-
end
|
34
|
+
|
42
35
|
create do
|
43
|
-
|
36
|
+
configure :password do
|
44
37
|
required true
|
45
38
|
end
|
46
|
-
|
39
|
+
configure :password_confirmation do
|
47
40
|
required true
|
48
41
|
end
|
49
|
-
# field :lock_version, :hidden do
|
50
|
-
# visible true
|
51
|
-
# end
|
52
|
-
# include UserRailsAdminCreateConcern
|
53
|
-
end
|
54
|
-
edit do
|
55
|
-
field :password do
|
56
|
-
required false
|
57
|
-
end
|
58
|
-
field :password_confirmation do
|
59
|
-
required false
|
60
|
-
end
|
61
|
-
|
62
|
-
# field :lock_version, :hidden do
|
63
|
-
# visible true
|
64
|
-
# end
|
65
|
-
# include UserRailsAdminEditConcern
|
66
|
-
|
67
42
|
end
|
68
43
|
end
|
69
44
|
end
|
data/config/locales/en.main.yml
CHANGED
data/config/locales/it.main.yml
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: thecore_ui_rails_admin
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: 3.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gabriele Tassoni
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-03-
|
11
|
+
date: 2023-03-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thecore_ui_commons
|