thecore_ui_rails_admin 3.0.18 → 3.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/config/initializers/abilities.rb +3 -3
- data/config/initializers/after_initialize.rb +12 -6
- data/config/initializers/concern_action.rb +19 -0
- data/config/initializers/concern_permission.rb +19 -0
- data/config/initializers/concern_permission_role.rb +17 -0
- data/config/initializers/concern_predicate.rb +19 -0
- data/config/initializers/concern_role.rb +1 -1
- data/config/initializers/concern_role_user.rb +17 -0
- data/config/initializers/concern_target.rb +19 -0
- data/config/initializers/concern_user.rb +12 -43
- data/config/locales/en.rails_admin.yml +3 -3
- data/config/locales/it.rails_admin.yml +3 -3
- metadata +8 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4d329590346564d4049ca6dcff96aecb5ff05a8a9c9ba548a7a3c2e2a579e5bd
|
4
|
+
data.tar.gz: a4820f4f4278a0474877c4ff9da212a46f87937beb74316da6cc7380182da859
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ae052206e0aa7a204b6bfc690df2b616bbbe68bec21a2c9b68612f568f5a149ce395c5094d3b413333bafa3dc9f53f6977638dd43e34f121d001650aa23c074f
|
7
|
+
data.tar.gz: 3049b5394b50caf047a4d2fa95828bc64309bfa0578af4301f5c7989b9cd709cbb06e1256bbbdbb09f9e67ad99655f0f441a5cb1566d5c0376201a37dc2e429a
|
@@ -4,9 +4,9 @@ module Abilities
|
|
4
4
|
def initialize user
|
5
5
|
# No one is allowed to add or destroy settings
|
6
6
|
# just list or edit existing
|
7
|
-
cannot :create, ThecoreSettings::Setting
|
8
|
-
|
9
|
-
cannot :show,
|
7
|
+
cannot [:create, :destroy, :show], ThecoreSettings::Setting
|
8
|
+
|
9
|
+
cannot [:destroy, :update, :edit, :show], Action
|
10
10
|
# Main abilities file for Thecore applications
|
11
11
|
if user.present?
|
12
12
|
# Users' abilities
|
@@ -26,12 +26,12 @@ Rails.application.configure do
|
|
26
26
|
RailsAdmin::Config.excluded_models << ActiveStorage::VariantRecord
|
27
27
|
RailsAdmin::Config.excluded_models << ActionMailbox::InboundEmail
|
28
28
|
RailsAdmin::Config.excluded_models << UsedToken rescue puts "No UsedToken Model it could be normal: maybe model_driven_api is not installed"
|
29
|
-
RailsAdmin::Config.excluded_models << RoleUser
|
30
|
-
RailsAdmin::Config.excluded_models << Predicate
|
31
|
-
RailsAdmin::Config.excluded_models << Target
|
32
|
-
RailsAdmin::Config.excluded_models << Action
|
33
|
-
RailsAdmin::Config.excluded_models << PermissionRole
|
34
|
-
RailsAdmin::Config.excluded_models << Permission
|
29
|
+
# RailsAdmin::Config.excluded_models << RoleUser
|
30
|
+
# RailsAdmin::Config.excluded_models << Predicate
|
31
|
+
# RailsAdmin::Config.excluded_models << Target
|
32
|
+
# RailsAdmin::Config.excluded_models << Action
|
33
|
+
# RailsAdmin::Config.excluded_models << PermissionRole
|
34
|
+
# RailsAdmin::Config.excluded_models << Permission
|
35
35
|
|
36
36
|
RailsAdmin::Config::Actions.add_action "active_job_monitor", :base, :root do
|
37
37
|
show_in_sidebar true
|
@@ -62,6 +62,12 @@ Rails.application.configure do
|
|
62
62
|
RailsAdmin::Config::Actions::BulkDelete.send(:include, BulkDeleteConcern)
|
63
63
|
Role.send :include, ThecoreUiRailsAdminRoleConcern
|
64
64
|
User.send :include, ThecoreUiRailsAdminUserConcern
|
65
|
+
RoleUser.send :include, ThecoreUiRailsAdminRoleUserConcern
|
66
|
+
Action.send :include, ThecoreUiRailsAdminActionConcern
|
67
|
+
PermissionRole.send :include, ThecoreUiRailsAdminPermissionRoleConcern
|
68
|
+
Permission.send :include, ThecoreUiRailsAdminPermissionConcern
|
69
|
+
Predicate.send :include, ThecoreUiRailsAdminPredicateConcern
|
70
|
+
Target.send :include, ThecoreUiRailsAdminTargetConcern
|
65
71
|
ThecoreSettings::Setting.send :include, ThecoreUiRailsAdminSettingsConcern
|
66
72
|
end
|
67
73
|
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
puts "Role Concern from ThecoreUiRailsAdmin"
|
2
|
+
require 'active_support/concern'
|
3
|
+
|
4
|
+
module ThecoreUiRailsAdminActionConcern
|
5
|
+
extend ActiveSupport::Concern
|
6
|
+
|
7
|
+
included do
|
8
|
+
|
9
|
+
rails_admin do
|
10
|
+
navigation_label I18n.t("admin.settings.label")
|
11
|
+
navigation_icon 'fas fa-users'
|
12
|
+
desc I18n.t("activerecord.descriptions.role")
|
13
|
+
|
14
|
+
visible false
|
15
|
+
|
16
|
+
exclude_fields :id, :lock_version, :updated_at
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
puts "Role Concern from ThecoreUiRailsAdmin"
|
2
|
+
require 'active_support/concern'
|
3
|
+
|
4
|
+
module ThecoreUiRailsAdminPermissionConcern
|
5
|
+
extend ActiveSupport::Concern
|
6
|
+
|
7
|
+
included do
|
8
|
+
|
9
|
+
rails_admin do
|
10
|
+
navigation_label I18n.t("admin.settings.label")
|
11
|
+
navigation_icon 'fas fa-users'
|
12
|
+
desc I18n.t("activerecord.descriptions.role")
|
13
|
+
|
14
|
+
visible false
|
15
|
+
|
16
|
+
exclude_fields :id, :lock_version, :updated_at, :permission_roles, :roles
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
puts "Role Concern from ThecoreUiRailsAdmin"
|
2
|
+
require 'active_support/concern'
|
3
|
+
|
4
|
+
module ThecoreUiRailsAdminPermissionRoleConcern
|
5
|
+
extend ActiveSupport::Concern
|
6
|
+
|
7
|
+
included do
|
8
|
+
|
9
|
+
rails_admin do
|
10
|
+
navigation_label I18n.t("admin.settings.label")
|
11
|
+
navigation_icon 'fas fa-users'
|
12
|
+
desc I18n.t("activerecord.descriptions.role")
|
13
|
+
|
14
|
+
visible false
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
puts "Role Concern from ThecoreUiRailsAdmin"
|
2
|
+
require 'active_support/concern'
|
3
|
+
|
4
|
+
module ThecoreUiRailsAdminPredicateConcern
|
5
|
+
extend ActiveSupport::Concern
|
6
|
+
|
7
|
+
included do
|
8
|
+
|
9
|
+
rails_admin do
|
10
|
+
navigation_label I18n.t("admin.settings.label")
|
11
|
+
navigation_icon 'fas fa-users'
|
12
|
+
desc I18n.t("activerecord.descriptions.role")
|
13
|
+
|
14
|
+
visible false
|
15
|
+
|
16
|
+
exclude_fields :id, :lock_version, :updated_at
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
puts "Role Concern from ThecoreUiRailsAdmin"
|
2
|
+
require 'active_support/concern'
|
3
|
+
|
4
|
+
module ThecoreUiRailsAdminRoleUserConcern
|
5
|
+
extend ActiveSupport::Concern
|
6
|
+
|
7
|
+
included do
|
8
|
+
|
9
|
+
rails_admin do
|
10
|
+
navigation_label I18n.t("admin.settings.label")
|
11
|
+
navigation_icon 'fas fa-users'
|
12
|
+
desc I18n.t("activerecord.descriptions.role")
|
13
|
+
|
14
|
+
visible false
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
puts "Role Concern from ThecoreUiRailsAdmin"
|
2
|
+
require 'active_support/concern'
|
3
|
+
|
4
|
+
module ThecoreUiRailsAdminTargetConcern
|
5
|
+
extend ActiveSupport::Concern
|
6
|
+
|
7
|
+
included do
|
8
|
+
|
9
|
+
rails_admin do
|
10
|
+
navigation_label I18n.t("admin.settings.label")
|
11
|
+
navigation_icon 'fas fa-users'
|
12
|
+
desc I18n.t("activerecord.descriptions.role")
|
13
|
+
|
14
|
+
visible false
|
15
|
+
|
16
|
+
exclude_fields :id, :lock_version, :updated_at
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
@@ -13,57 +13,26 @@ module ThecoreUiRailsAdminUserConcern
|
|
13
13
|
parent Role
|
14
14
|
desc I18n.t("activerecord.descriptions.user")
|
15
15
|
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
16
|
+
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
|
17
|
+
|
18
|
+
configure :admin, :boolean
|
19
|
+
|
20
|
+
edit do
|
21
|
+
configure :password do
|
22
|
+
required false
|
23
23
|
end
|
24
|
-
|
25
|
-
|
26
|
-
visible do
|
27
|
-
bindings[:view].current_user.admin? && bindings[:view].current_user.id != bindings[:object].id rescue false
|
24
|
+
configure :password_confirmation do
|
25
|
+
required false
|
28
26
|
end
|
29
27
|
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
|
28
|
+
|
42
29
|
create do
|
43
|
-
|
30
|
+
configure :password do
|
44
31
|
required true
|
45
32
|
end
|
46
|
-
|
33
|
+
configure :password_confirmation do
|
47
34
|
required true
|
48
35
|
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
36
|
end
|
68
37
|
end
|
69
38
|
end
|
@@ -6,8 +6,8 @@ it:
|
|
6
6
|
index:
|
7
7
|
no_records: Nessun record da mostrare
|
8
8
|
active_job_monitor:
|
9
|
-
menu: Worker Monitor
|
10
|
-
title: Worker Monitor
|
11
|
-
breadcrumb: Worker Monitor
|
9
|
+
menu: Async Worker Monitor
|
10
|
+
title: Async Worker Monitor
|
11
|
+
breadcrumb: Async Worker Monitor
|
12
12
|
scopes:
|
13
13
|
_all: Tutti
|
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.0
|
4
|
+
version: 3.1.0
|
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-
|
11
|
+
date: 2023-03-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thecore_ui_commons
|
@@ -84,10 +84,16 @@ files:
|
|
84
84
|
- config/initializers/add_to_db_migrations.rb
|
85
85
|
- config/initializers/after_initialize.rb
|
86
86
|
- config/initializers/assets.rb
|
87
|
+
- config/initializers/concern_action.rb
|
87
88
|
- config/initializers/concern_bulk_delete.rb
|
88
89
|
- config/initializers/concern_export.rb
|
90
|
+
- config/initializers/concern_permission.rb
|
91
|
+
- config/initializers/concern_permission_role.rb
|
92
|
+
- config/initializers/concern_predicate.rb
|
89
93
|
- config/initializers/concern_role.rb
|
94
|
+
- config/initializers/concern_role_user.rb
|
90
95
|
- config/initializers/concern_settings.rb
|
96
|
+
- config/initializers/concern_target.rb
|
91
97
|
- config/initializers/concern_user.rb
|
92
98
|
- config/locales/en.index_cards.custom.yml
|
93
99
|
- config/locales/en.main.yml
|