thecore_ui_rails_admin 2.3.7 → 2.4.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4e463c54522828d09b59b3851ea86893698b0d25b14bc0b45aeab27ef5709d79
4
- data.tar.gz: 91e1a2d6ff4d0054d60ba54e6d27bcfa471c1d219c3cd7c4fc65c491cb3c3375
3
+ metadata.gz: cf5ef77b7350f3b3db1ac10329ff211c6912d81af8deb7ccfef64e2a44fb703a
4
+ data.tar.gz: 6fc7f5a2c50d3ecdc9520c8b95bf533d520fa5b41b2eb00d392501df2af46b91
5
5
  SHA512:
6
- metadata.gz: 980980371869c46e9e2fb547af383f78f3d97bfd6c7aee47c768960478b7e4e8d5e7aef9dd595c0c4de4e2be2cf8353b010afdde573c2d2782753d1a564681e2
7
- data.tar.gz: 10e802da71db82d2139bcf4796d8413dd50523d24bba7bdbf5d2a717696b4326cc78e1debdfa145534d7a869f874b712df5315c953099dec4338a8511808e004
6
+ metadata.gz: 4b36f604e772e954819f8661e6788d59e174e95b73a9bc97a5411e85123f69a56dde2f9dd48e93e2c6c7067405d5b8d5b5fdf2b6af3fddf69ef8eff63cd0b41f
7
+ data.tar.gz: a97f275432de1a5812d7408612dda0704091079dd3f3703de611359a71674c4d5a4bdf582d2dc07a0c01c52e766e7c8784139fc41f994056a05a6f06d5cb78d3
@@ -9,7 +9,7 @@ module ThecoreConcern
9
9
  layout 'thecore'
10
10
  protect_from_forgery with: :exception, prepend: true
11
11
  rescue_from CanCan::AccessDenied do |exception|
12
- redirect_to main_app.root_url, :alert => exception.message
12
+ redirect_to main_app.root_url, alert: exception.message
13
13
  end
14
14
  include HttpAcceptLanguage::AutoLocale
15
15
  before_action :store_user_location!, if: :storable_location?
@@ -33,15 +33,16 @@ module ThecoreConcern
33
33
  action = root_actions.collect(&:action_name).first
34
34
  # REDIRECT TO THAT ACTION
35
35
 
36
- puts "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA: Checking redirect path"
37
- if stored_location_for(resource) && can?(resource, :all)
38
- puts "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA: Checking redirect path: I'm in the IF"
39
- return stored_location_for(resource)
36
+ Rails.logger.info "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA: Checking redirect path"
37
+ stored_location = stored_location_for(resource)
38
+ if !stored_location.blank? && can?(resource, :all)
39
+ Rails.logger.info "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA: Checking redirect path: I'm in the IF stored_location_for(resource): #{stored_location}"
40
+ return stored_location
40
41
  elsif action
41
- puts "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA: Checking redirect path: I'm in the ELSIF with action name: #{action}"
42
+ Rails.logger.info "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA: Checking redirect path: I'm in the ELSIF with action name: #{action}"
42
43
  return rails_admin.send("#{action}_path").sub("#{ENV['RAILS_RELATIVE_URL_ROOT']}#{ENV['RAILS_RELATIVE_URL_ROOT']}", "#{ENV['RAILS_RELATIVE_URL_ROOT']}")
43
44
  else
44
- puts "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA: Checking redirect path: I'm in the ELSE with root_path: #{root_path}"
45
+ Rails.logger.info "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA: Checking redirect path: I'm in the ELSE with root_path: #{root_path}"
45
46
  sign_out current_user
46
47
  user_session = nil
47
48
  current_user = nil
@@ -104,7 +105,9 @@ module ThecoreConcern
104
105
 
105
106
  # Auto-sign out locked users
106
107
  def reject_locked!
107
- if current_user && current_user.locked?
108
+ Rails.logger.info "BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB reject_locked"
109
+ if !current_user.blank? && current_user.locked?
110
+ Rails.logger.info "BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB is locked"
108
111
  sign_out current_user
109
112
  user_session = nil
110
113
  current_user = nil
@@ -112,7 +115,9 @@ module ThecoreConcern
112
115
  flash[:notice] = nil
113
116
  redirect_to root_url
114
117
  end
118
+ Rails.logger.info "BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB is not locked = ok"
115
119
  end
120
+
116
121
 
117
122
  # Only permits admin users
118
123
  def require_admin!
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: 2.3.7
4
+ version: 2.4.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: 2021-07-05 00:00:00.000000000 Z
11
+ date: 2021-07-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thecore_ui_commons