diff --git a/Gemfile.lock b/Gemfile.lock index 4f8afa5e56..e49bcd8b13 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -21,53 +21,53 @@ GIT GEM remote: https://rubygems.org/ specs: - actioncable (6.1.7.7) - actionpack (= 6.1.7.7) - activesupport (= 6.1.7.7) + actioncable (6.1.7.8) + actionpack (= 6.1.7.8) + activesupport (= 6.1.7.8) nio4r (~> 2.0) websocket-driver (>= 0.6.1) - actionmailbox (6.1.7.7) - actionpack (= 6.1.7.7) - activejob (= 6.1.7.7) - activerecord (= 6.1.7.7) - activestorage (= 6.1.7.7) - activesupport (= 6.1.7.7) + actionmailbox (6.1.7.8) + actionpack (= 6.1.7.8) + activejob (= 6.1.7.8) + activerecord (= 6.1.7.8) + activestorage (= 6.1.7.8) + activesupport (= 6.1.7.8) mail (>= 2.7.1) - actionmailer (6.1.7.7) - actionpack (= 6.1.7.7) - actionview (= 6.1.7.7) - activejob (= 6.1.7.7) - activesupport (= 6.1.7.7) + actionmailer (6.1.7.8) + actionpack (= 6.1.7.8) + actionview (= 6.1.7.8) + activejob (= 6.1.7.8) + activesupport (= 6.1.7.8) mail (~> 2.5, >= 2.5.4) rails-dom-testing (~> 2.0) - actionpack (6.1.7.7) - actionview (= 6.1.7.7) - activesupport (= 6.1.7.7) + actionpack (6.1.7.8) + actionview (= 6.1.7.8) + activesupport (= 6.1.7.8) rack (~> 2.0, >= 2.0.9) rack-test (>= 0.6.3) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.0, >= 1.2.0) - actiontext (6.1.7.7) - actionpack (= 6.1.7.7) - activerecord (= 6.1.7.7) - activestorage (= 6.1.7.7) - activesupport (= 6.1.7.7) + actiontext (6.1.7.8) + actionpack (= 6.1.7.8) + activerecord (= 6.1.7.8) + activestorage (= 6.1.7.8) + activesupport (= 6.1.7.8) nokogiri (>= 1.8.5) - actionview (6.1.7.7) - activesupport (= 6.1.7.7) + actionview (6.1.7.8) + activesupport (= 6.1.7.8) builder (~> 3.1) erubi (~> 1.4) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.1, >= 1.2.0) - activejob (6.1.7.7) - activesupport (= 6.1.7.7) + activejob (6.1.7.8) + activesupport (= 6.1.7.8) globalid (>= 0.3.6) - activemodel (6.1.7.7) - activesupport (= 6.1.7.7) - activerecord (6.1.7.7) - activemodel (= 6.1.7.7) - activesupport (= 6.1.7.7) - activerecord-import (1.6.0) + activemodel (6.1.7.8) + activesupport (= 6.1.7.8) + activerecord (6.1.7.8) + activemodel (= 6.1.7.8) + activesupport (= 6.1.7.8) + activerecord-import (1.7.0) activerecord (>= 4.2) activerecord-session_store (2.1.0) actionpack (>= 6.1) @@ -76,14 +76,14 @@ GEM multi_json (~> 1.11, >= 1.11.2) rack (>= 2.0.8, < 4) railties (>= 6.1) - activestorage (6.1.7.7) - actionpack (= 6.1.7.7) - activejob (= 6.1.7.7) - activerecord (= 6.1.7.7) - activesupport (= 6.1.7.7) + activestorage (6.1.7.8) + actionpack (= 6.1.7.8) + activejob (= 6.1.7.8) + activerecord (= 6.1.7.8) + activesupport (= 6.1.7.8) marcel (~> 1.0) mini_mime (>= 1.1.0) - activesupport (6.1.7.7) + activesupport (6.1.7.8) concurrent-ruby (~> 1.0, >= 1.0.2) i18n (>= 1.6, < 2) minitest (>= 5.1) @@ -93,30 +93,30 @@ GEM public_suffix (>= 2.0.2, < 6.0) ansi (1.5.0) ast (2.4.2) - attr_encrypted (4.0.0) + attr_encrypted (4.1.0) encryptor (~> 3.0.0) aws-eventstream (1.3.0) - aws-partitions (1.925.0) - aws-sdk-cloudwatchlogs (1.81.0) - aws-sdk-core (~> 3, >= 3.193.0) + aws-partitions (1.944.0) + aws-sdk-cloudwatchlogs (1.83.0) + aws-sdk-core (~> 3, >= 3.197.0) aws-sigv4 (~> 1.1) - aws-sdk-core (3.194.2) + aws-sdk-core (3.197.0) aws-eventstream (~> 1, >= 1.3.0) aws-partitions (~> 1, >= 1.651.0) aws-sigv4 (~> 1.8) jmespath (~> 1, >= 1.6.1) - aws-sdk-kms (1.80.0) - aws-sdk-core (~> 3, >= 3.193.0) + aws-sdk-kms (1.85.0) + aws-sdk-core (~> 3, >= 3.197.0) aws-sigv4 (~> 1.1) - aws-sdk-pinpoint (1.88.0) - aws-sdk-core (~> 3, >= 3.193.0) + aws-sdk-pinpoint (1.91.0) + aws-sdk-core (~> 3, >= 3.197.0) aws-sigv4 (~> 1.1) - aws-sdk-s3 (1.149.1) - aws-sdk-core (~> 3, >= 3.194.0) + aws-sdk-s3 (1.152.3) + aws-sdk-core (~> 3, >= 3.197.0) aws-sdk-kms (~> 1) aws-sigv4 (~> 1.8) - aws-sdk-sns (1.74.0) - aws-sdk-core (~> 3, >= 3.193.0) + aws-sdk-sns (1.77.0) + aws-sdk-core (~> 3, >= 3.197.0) aws-sigv4 (~> 1.1) aws-sigv4 (1.8.0) aws-eventstream (~> 1, >= 1.0.2) @@ -130,7 +130,7 @@ GEM msgpack (~> 1.2) brakeman (6.1.2) racc - builder (3.2.4) + builder (3.3.0) bundler-audit (0.9.1) bundler (>= 1.2.0, < 3) thor (~> 1.0) @@ -147,7 +147,7 @@ GEM cgi (0.4.1) childprocess (4.1.0) chunky_png (1.4.0) - concurrent-ruby (1.2.3) + concurrent-ruby (1.3.3) countries (5.7.2) unaccent (~> 0.3) country_select (8.0.3) @@ -195,9 +195,9 @@ GEM dotenv (3.1.2) e2mmap (0.1.0) encryptor (3.0.0) - erubi (1.12.0) + erubi (1.13.0) execjs (2.9.1) - ffi (1.16.3) + ffi (1.17.0) flog (4.8.0) path_expander (~> 1.0) ruby_parser (~> 3.1, > 3.1.0) @@ -207,15 +207,15 @@ GEM hashdiff (1.1.0) hashie (3.4.6) http-accept (1.7.0) - http-cookie (1.0.5) + http-cookie (1.0.6) domain_name (~> 0.5) i18n (1.14.5) concurrent-ruby (~> 1.0) io-console (0.7.2) - irb (1.13.1) + irb (1.13.2) rdoc (>= 4.0.0) reline (>= 0.4.2) - jaro_winkler (1.5.6) + jaro_winkler (1.6.0) jmespath (1.6.2) jquery-fileupload-rails (0.4.7) actionpack (>= 3.1) @@ -248,13 +248,13 @@ GEM method_source (1.1.0) mime-types (3.5.2) mime-types-data (~> 3.2015) - mime-types-data (3.2024.0507) + mime-types-data (3.2024.0604) mini_mime (1.1.5) - mini_portile2 (2.8.6) - minitest (5.22.3) + mini_portile2 (2.8.7) + minitest (5.23.1) msgpack (1.7.2) multi_json (1.15.0) - net-imap (0.4.11) + net-imap (0.4.13) date net-protocol net-pop (0.1.2) @@ -265,45 +265,41 @@ GEM net-protocol netrc (0.11.0) nio4r (2.7.3) - nokogiri (1.16.4) + nokogiri (1.16.6) mini_portile2 (~> 2.8.2) racc (~> 1.4) - nokogiri (1.16.4-arm64-darwin) - racc (~> 1.4) - nokogiri (1.16.4-x86_64-linux) - racc (~> 1.4) orm_adapter (0.5.0) - parallel (1.24.0) + parallel (1.25.1) parallel_tests (4.7.1) parallel - parser (3.3.1.0) + parser (3.3.3.0) ast (~> 2.4.1) racc path_expander (1.1.1) pg (1.5.6) psych (5.1.2) stringio - public_suffix (5.0.5) + public_suffix (5.1.1) puma (6.4.2) nio4r (~> 2.0) - racc (1.7.3) + racc (1.8.0) rack (2.2.9) rack-test (2.1.0) rack (>= 1.3) - rails (6.1.7.7) - actioncable (= 6.1.7.7) - actionmailbox (= 6.1.7.7) - actionmailer (= 6.1.7.7) - actionpack (= 6.1.7.7) - actiontext (= 6.1.7.7) - actionview (= 6.1.7.7) - activejob (= 6.1.7.7) - activemodel (= 6.1.7.7) - activerecord (= 6.1.7.7) - activestorage (= 6.1.7.7) - activesupport (= 6.1.7.7) + rails (6.1.7.8) + actioncable (= 6.1.7.8) + actionmailbox (= 6.1.7.8) + actionmailer (= 6.1.7.8) + actionpack (= 6.1.7.8) + actiontext (= 6.1.7.8) + actionview (= 6.1.7.8) + activejob (= 6.1.7.8) + activemodel (= 6.1.7.8) + activerecord (= 6.1.7.8) + activestorage (= 6.1.7.8) + activesupport (= 6.1.7.8) bundler (>= 1.15.0) - railties (= 6.1.7.7) + railties (= 6.1.7.8) sprockets-rails (>= 2.0.0) rails-controller-testing (1.0.5) actionpack (>= 5.0.1.rc1) @@ -316,22 +312,22 @@ GEM rails-html-sanitizer (1.6.0) loofah (~> 2.21) nokogiri (~> 1.14) - railties (6.1.7.7) - actionpack (= 6.1.7.7) - activesupport (= 6.1.7.7) + railties (6.1.7.8) + actionpack (= 6.1.7.8) + activesupport (= 6.1.7.8) method_source rake (>= 12.2) thor (~> 1.0) rainbow (3.1.1) rake (13.2.1) rb-fsevent (0.11.2) - rb-inotify (0.10.1) + rb-inotify (0.11.1) ffi (~> 1.0) rbs (2.8.4) - rdoc (6.6.3.1) + rdoc (6.7.0) psych (>= 4.0.0) - regexp_parser (2.9.0) - reline (0.5.5) + regexp_parser (2.9.2) + reline (0.5.9) io-console (~> 0.5) responders (3.1.1) actionpack (>= 5.2) @@ -343,7 +339,8 @@ GEM netrc (~> 0.8) reverse_markdown (2.1.1) nokogiri - rexml (3.2.6) + rexml (3.3.0) + strscan rotp (6.3.0) rqrcode (2.2.0) chunky_png (~> 1.0) @@ -351,7 +348,7 @@ GEM rqrcode_core (1.2.0) rspec-core (3.13.0) rspec-support (~> 3.13.0) - rspec-expectations (3.13.0) + rspec-expectations (3.13.1) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.13.0) rspec-mocks (3.13.1) @@ -366,7 +363,7 @@ GEM rspec-mocks (~> 3.13) rspec-support (~> 3.13) rspec-support (3.13.1) - rubocop (1.63.4) + rubocop (1.64.1) json (~> 2.3) language_server-protocol (>= 3.17.0) parallel (~> 1.10) @@ -438,16 +435,17 @@ GEM base64 concurrent-ruby (~> 1.0) rack (> 1, < 3) - sprockets-rails (3.4.2) - actionpack (>= 5.2) - activesupport (>= 5.2) + sprockets-rails (3.5.1) + actionpack (>= 6.1) + activesupport (>= 6.1) sprockets (>= 3.0.0) - stringio (3.1.0) + stringio (3.1.1) strong_password (0.0.10) + strscan (3.1.0) syslog-logger (1.6.8) terminal-table (3.0.2) unicode-display_width (>= 1.1.1, < 3) - terser (1.2.2) + terser (1.2.3) execjs (>= 0.3.0, < 3) thor (1.3.1) tilt (2.3.0) @@ -463,7 +461,7 @@ GEM activemodel (>= 6.0.0) bindex (>= 0.4.0) railties (>= 6.0.0) - webmock (3.23.0) + webmock (3.23.1) addressable (>= 2.8.0) crack (>= 0.3.2) hashdiff (>= 0.4.0, < 2.0.0) @@ -474,12 +472,10 @@ GEM xpath (3.2.0) nokogiri (~> 1.8) yard (0.9.36) - zeitwerk (2.6.13) + zeitwerk (2.6.16) PLATFORMS - arm64-darwin-21 ruby - x86_64-linux DEPENDENCIES activerecord-import @@ -542,4 +538,4 @@ DEPENDENCIES webmock BUNDLED WITH - 2.4.13 + 2.5.11 diff --git a/app/controllers/admin/user_roles_controller.rb b/app/controllers/admin/user_roles_controller.rb index 873bff54b6..ffa4208003 100644 --- a/app/controllers/admin/user_roles_controller.rb +++ b/app/controllers/admin/user_roles_controller.rb @@ -38,12 +38,13 @@ def filters { app_type_id: Admin::AppType.all_by_name, role_name: Admin::UserRole.active.role_names.sort, - user_id: Admin::UserRole.active.users.pluck(:id, :email).to_h + user_id: Admin::UserRole.active.users.pluck(:id, :email).to_h, + user_status: [true, false] # try hash? } end def filters_on - %i[app_type_id role_name user_id] + %i[app_type_id role_name user_id user_status] end def admin_links(item = nil) diff --git a/app/controllers/concerns/admin_controller_handler.rb b/app/controllers/concerns/admin_controller_handler.rb index 80a1d842f0..72eb75a5ab 100644 --- a/app/controllers/concerns/admin_controller_handler.rb +++ b/app/controllers/concerns/admin_controller_handler.rb @@ -16,6 +16,8 @@ module AdminControllerHandler end def index + # TODO remove + # debugger pm = filtered_primary_model pm = pm.limited_index pm = pm.reorder('').order(default_index_order) if default_index_order.present? diff --git a/app/controllers/concerns/filter_utils.rb b/app/controllers/concerns/filter_utils.rb index a6d0b837ec..a7553158f6 100644 --- a/app/controllers/concerns/filter_utils.rb +++ b/app/controllers/concerns/filter_utils.rb @@ -15,8 +15,10 @@ module FilterUtils # @param [ActiveRecord::Model] pm optionally overrides the default in the primary_model attribute value # @return [ActiveRecord::Relation] def filtered_primary_model(pm = nil) + # TODO remove + # debugger pm ||= primary_model - + # where clause if filter_params pm = pm.active if filter_params[:disabled] == 'enabled' || !current_admin pm = pm.disabled if filter_params[:disabled] == 'disabled' && current_admin diff --git a/app/models/admin/user_role.rb b/app/models/admin/user_role.rb index cd49ad8d3f..2ecd59ef0c 100644 --- a/app/models/admin/user_role.rb +++ b/app/models/admin/user_role.rb @@ -51,6 +51,8 @@ def self.active_app_roles(user, conditions = {}) # @param conditions [Hash] full set of where clause conditions # @return [ActiveRecord::Relation] def self.where(conditions) + # TODO remove + # debugger if conditions.is_a?(Hash) && !conditions.empty? ur_cond = conditions.dup ur_cond = conditions[:user_roles] if conditions[:user_roles] diff --git a/app/views/admin/common_templates/_item.html.erb b/app/views/admin/common_templates/_item.html.erb index 2a36ea9cf2..daa1f3ddbb 100644 --- a/app/views/admin/common_templates/_item.html.erb +++ b/app/views/admin/common_templates/_item.html.erb @@ -1,4 +1,5 @@ <% + # add column for disabled/enabled users num_fields = 1 found_options = false