thecore_ui_rails_admin 3.2.6 → 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: 7aaa6eceba5085c48b2aef1e43e0a275551c097957fcbd435ef70dd8049441bd
4
- data.tar.gz: bdae0794f9ea2c360f3026202a503f581684eec584bb86e88640c532742ae94d
3
+ metadata.gz: 4dd6a195e8e9fa3484743a58ecc2b97e45cd4e170ddc9d4ecd675bb1a3f50197
4
+ data.tar.gz: 8c172b55c414aca054a5a390acf4fd7c17a84f9d268e58943602edfd95d51024
5
5
  SHA512:
6
- metadata.gz: 7e5d93c0c41af1b7fdc68c0a5bec282c963412b0ad43c24833eb5ee50ef5de3658299b1fa211c18b5c4b4e2e3eb43248a6bebc28851033de6576d2d4912407aa
7
- data.tar.gz: 1f26044e57499a8b9cfb3876ef0a91b6539c052cf09a6b6f652e26c92d0f21a7df3e03900f23b82ae42a98813b51e1127d591e7f2cfac94e11397afcc28d03ce
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
- 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.6".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.6
4
+ version: 3.2.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gabriele Tassoni