thecore_ui_rails_admin 3.2.5 → 3.2.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f3c52f1a2f5d388bbdac87ce0d5ee2bf5b80cc90e6c8eb0693923e59b71310af
4
- data.tar.gz: 052b4f445671747de59c422af8876fbc915012c4696e03e137c1fdd2b6382cde
3
+ metadata.gz: 4dd6a195e8e9fa3484743a58ecc2b97e45cd4e170ddc9d4ecd675bb1a3f50197
4
+ data.tar.gz: 8c172b55c414aca054a5a390acf4fd7c17a84f9d268e58943602edfd95d51024
5
5
  SHA512:
6
- metadata.gz: 1c578d1a1b12799fd671f7bd40581030eeff615d0893a9c437a1d2b6303e43620f1091983f290c12cc80940d37422301e1d51785485124df46d56fd65c92868e
7
- data.tar.gz: c5f7d40833d84a12c391f04e7edbffdfb43fd8983f9e8d040d4761f81349d2f481fa3c9edd7e9884ada18bea58951aef0edbda5a95356e142f8a06fc28b9f22b
6
+ metadata.gz: 9b6c09bef2e40af200acd55ebe2306d46d750f60b05acadfb1ad30fd45537fc8c177032834ed4296177c183f83ce679f7444de034a54282958fc5b771d3eddda
7
+ data.tar.gz: 0d8d40583bf670ad1c33c6b9b188c64737f384e4916ca3ed0825208cf43a84c6312b8c506ec0a4ae2ac6bc750d73d7fcd9703804115e8e7d0e4d822694e9926b
@@ -1,5 +1,9 @@
1
1
  Rails.application.configure do
2
2
  config.after_initialize do
3
+ puts "ThecoreUiRailsAdmin after_initialize"
4
+
5
+ RailsAdmin::ApplicationController.send(:include, ConcernCommonApplicationController)
6
+ ApplicationController.send(:include, ConcernRAApplicationController)
3
7
  RailsAdmin::ApplicationController.send(:include, ConcernRAApplicationController)
4
8
  ## Rails Admin
5
9
  ### More at https://github.com/sferik/rails_admin/wiki/Base-configuration
@@ -1,4 +1,4 @@
1
- puts "Role Concern from ThecoreUiRailsAdmin"
1
+ puts "Action Concern from ThecoreUiRailsAdmin"
2
2
  require 'active_support/concern'
3
3
 
4
4
  module ThecoreUiRailsAdminActionConcern
@@ -1,3 +1,4 @@
1
+ puts "BulkDelete Concern from ThecoreUiRailsAdmin"
1
2
  require 'active_support/concern'
2
3
 
3
4
  module BulkDeleteConcern
@@ -1,4 +1,4 @@
1
- puts "Role Concern from ThecoreUiRailsAdmin"
1
+ puts "Permission Concern from ThecoreUiRailsAdmin"
2
2
  require 'active_support/concern'
3
3
 
4
4
  module ThecoreUiRailsAdminPermissionConcern
@@ -1,4 +1,4 @@
1
- puts "Role Concern from ThecoreUiRailsAdmin"
1
+ puts "PermissionRole Concern from ThecoreUiRailsAdmin"
2
2
  require 'active_support/concern'
3
3
 
4
4
  module ThecoreUiRailsAdminPermissionRoleConcern
@@ -1,4 +1,4 @@
1
- puts "Role Concern from ThecoreUiRailsAdmin"
1
+ puts "Predicate Concern from ThecoreUiRailsAdmin"
2
2
  require 'active_support/concern'
3
3
 
4
4
  module ThecoreUiRailsAdminPredicateConcern
@@ -1,4 +1,4 @@
1
- Rails.logger.debug "ApplicationController Concern from ThecoreUiRailsAdmin"
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
- Rails.logger.debug "after_sign_in_path_for action: #{action}"
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
- Rails.logger.debug "after_sign_in_path_for stored_location: #{stored_location}"
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
- Rails.logger.debug "after_sign_in_path_for Redirect to stored_location"
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
- Rails.logger.debug "after_sign_in_path_for Redirect to action #{path}"
30
+ puts "after_sign_in_path_for Redirect to action #{path}"
30
31
  return path
31
32
  else
32
- Rails.logger.debug "after_sign_in_path_for ERROR! Signing out user :-("
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
@@ -1,4 +1,4 @@
1
- puts "Role Concern from ThecoreUiRailsAdmin"
1
+ puts "RoleUser Concern from ThecoreUiRailsAdmin"
2
2
  require 'active_support/concern'
3
3
 
4
4
  module ThecoreUiRailsAdminRoleUserConcern
@@ -1,4 +1,4 @@
1
- puts "Role Concern from ThecoreUiRailsAdmin"
1
+ puts "Target Concern from ThecoreUiRailsAdmin"
2
2
  require 'active_support/concern'
3
3
 
4
4
  module ThecoreUiRailsAdminTargetConcern
@@ -1,3 +1,3 @@
1
1
  module ThecoreUiRailsAdmin
2
- VERSION = "3.2.5".freeze
2
+ VERSION = "3.2.7".freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: thecore_ui_rails_admin
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.2.5
4
+ version: 3.2.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gabriele Tassoni
@@ -90,12 +90,12 @@ files:
90
90
  - config/initializers/after_initialize.rb
91
91
  - config/initializers/assets.rb
92
92
  - config/initializers/concern_action.rb
93
- - config/initializers/concern_application_controller.rb
94
93
  - config/initializers/concern_bulk_delete.rb
95
94
  - config/initializers/concern_export.rb
96
95
  - config/initializers/concern_permission.rb
97
96
  - config/initializers/concern_permission_role.rb
98
97
  - config/initializers/concern_predicate.rb
98
+ - config/initializers/concern_r_a_application_controller.rb
99
99
  - config/initializers/concern_role.rb
100
100
  - config/initializers/concern_role_user.rb
101
101
  - config/initializers/concern_settings.rb