thecore_ui_rails_admin 3.2.6 → 3.2.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/javascripts/channels/index.js +1 -1
- data/app/assets/javascripts/rails_admin/custom/ui.js.erb +0 -3
- data/config/initializers/after_initialize.rb +3 -0
- data/config/initializers/concern_action.rb +1 -1
- data/config/initializers/concern_bulk_delete.rb +1 -0
- data/config/initializers/concern_permission.rb +1 -1
- data/config/initializers/concern_permission_role.rb +1 -1
- data/config/initializers/concern_predicate.rb +1 -1
- data/config/initializers/concern_r_a_application_controller.rb +7 -6
- data/config/initializers/concern_role_user.rb +1 -1
- data/config/initializers/concern_target.rb +1 -1
- data/lib/thecore_ui_rails_admin/version.rb +1 -1
- 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: b2c8b09aa7246a26e76e2bf6faf0c65df2c9e3206c4aac59b558473d8962602f
|
4
|
+
data.tar.gz: 353f9b7cb7815dac43aff6f9565c048fab53d132a04be5d03e019049229cafcd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9d2c79054533bfc49ea2964989b68ce61f1bbce23a5c0f1c647af81dfbea8267a55c24e0c2cec096cf2b08f490c37589ab5f55f331b650497a743b46e8211985
|
7
|
+
data.tar.gz: 2610253b51c087a99cd0b35059e3c60a287ff81d08eef32bb3d75390be39a68350b19cc5b75e610f11cce36bd158c38a91b24382d159467b94840854c9d243f1
|
@@ -1,6 +1,9 @@
|
|
1
1
|
Rails.application.configure do
|
2
2
|
config.after_initialize do
|
3
|
+
puts "ThecoreUiRailsAdmin after_initialize"
|
4
|
+
|
3
5
|
RailsAdmin::ApplicationController.send(:include, ConcernCommonApplicationController)
|
6
|
+
ApplicationController.send(:include, ConcernRAApplicationController)
|
4
7
|
RailsAdmin::ApplicationController.send(:include, ConcernRAApplicationController)
|
5
8
|
## Rails Admin
|
6
9
|
### More at https://github.com/sferik/rails_admin/wiki/Base-configuration
|
@@ -1,4 +1,4 @@
|
|
1
|
-
|
1
|
+
puts "RAApplicationController Concern from ThecoreUiRailsAdmin"
|
2
2
|
require 'active_support/concern'
|
3
3
|
|
4
4
|
module ConcernRAApplicationController
|
@@ -7,11 +7,12 @@ module ConcernRAApplicationController
|
|
7
7
|
included do
|
8
8
|
# Redirects on successful sign in
|
9
9
|
def after_sign_in_path_for resource
|
10
|
+
puts "after_sign_in_path_for #{resource}"
|
10
11
|
root_actions = RailsAdmin::Config::Actions.all(:root).select {|action| can? :read, action.action_name }.collect(&:action_name)
|
11
12
|
|
12
13
|
# Default root action as landing page: the first to which I have authorization to read
|
13
14
|
action = root_actions.first
|
14
|
-
|
15
|
+
puts "after_sign_in_path_for action: #{action}"
|
15
16
|
# Otherwise, if I set a Manual override for landing actions in config, I can test if I'm authorized to see it
|
16
17
|
override_landing_page = Settings.ns(:main).after_sign_in_redirect_to_root_action
|
17
18
|
action = override_landing_page.to_sym if !override_landing_page.blank? && root_actions.include?(override_landing_page.to_sym)
|
@@ -19,17 +20,17 @@ module ConcernRAApplicationController
|
|
19
20
|
# If I ask for a specific page, Let's try to go back there if I need to login or re-login
|
20
21
|
# This takes precedence on automatic computed action
|
21
22
|
stored_location = stored_location_for(resource)
|
22
|
-
|
23
|
+
puts "after_sign_in_path_for stored_location: #{stored_location}"
|
23
24
|
if !stored_location.blank? && can?(resource, :all)
|
24
25
|
# Go to the latest navigated page
|
25
|
-
|
26
|
+
puts "after_sign_in_path_for Redirect to stored_location"
|
26
27
|
return stored_location
|
27
28
|
elsif action
|
28
29
|
path = rails_admin.send("#{action}_path").sub("#{ENV['RAILS_RELATIVE_URL_ROOT']}#{ENV['RAILS_RELATIVE_URL_ROOT']}", "#{ENV['RAILS_RELATIVE_URL_ROOT']}")
|
29
|
-
|
30
|
+
puts "after_sign_in_path_for Redirect to action #{path}"
|
30
31
|
return path
|
31
32
|
else
|
32
|
-
|
33
|
+
puts "after_sign_in_path_for ERROR! Signing out user :-("
|
33
34
|
sign_out current_user
|
34
35
|
user_session = nil
|
35
36
|
current_user = nil
|
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.2.
|
4
|
+
version: 3.2.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gabriele Tassoni
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-08-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thecore_ui_commons
|