thecore_ui_rails_admin 3.2.6 → 3.2.7
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 +4 -4
- 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 +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4dd6a195e8e9fa3484743a58ecc2b97e45cd4e170ddc9d4ecd675bb1a3f50197
|
4
|
+
data.tar.gz: 8c172b55c414aca054a5a390acf4fd7c17a84f9d268e58943602edfd95d51024
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9b6c09bef2e40af200acd55ebe2306d46d750f60b05acadfb1ad30fd45537fc8c177032834ed4296177c183f83ce679f7444de034a54282958fc5b771d3eddda
|
7
|
+
data.tar.gz: 0d8d40583bf670ad1c33c6b9b188c64737f384e4916ca3ed0825208cf43a84c6312b8c506ec0a4ae2ac6bc750d73d7fcd9703804115e8e7d0e4d822694e9926b
|
@@ -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
|