motor-admin 0.1.55 → 0.1.61

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.
Files changed (52) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +9 -13
  3. data/app/controllers/concerns/motor/current_ability.rb +21 -0
  4. data/app/controllers/concerns/motor/current_user_method.rb +8 -7
  5. data/app/controllers/motor/alerts_controller.rb +4 -4
  6. data/app/controllers/motor/api_base_controller.rb +2 -12
  7. data/app/controllers/motor/application_controller.rb +1 -0
  8. data/app/controllers/motor/audits_controller.rb +1 -1
  9. data/app/controllers/motor/auth_tokens_controller.rb +36 -0
  10. data/app/controllers/motor/configs_controller.rb +2 -2
  11. data/app/controllers/motor/dashboards_controller.rb +8 -4
  12. data/app/controllers/motor/data_controller.rb +9 -4
  13. data/app/controllers/motor/forms_controller.rb +4 -4
  14. data/app/controllers/motor/icons_controller.rb +2 -0
  15. data/app/controllers/motor/queries_controller.rb +4 -4
  16. data/app/controllers/motor/resource_methods_controller.rb +2 -0
  17. data/app/controllers/motor/resources_controller.rb +2 -2
  18. data/app/controllers/motor/run_queries_controller.rb +21 -1
  19. data/app/controllers/motor/ui_controller.rb +1 -1
  20. data/app/views/motor/ui/show.html.erb +1 -1
  21. data/config/routes.rb +1 -0
  22. data/lib/generators/motor/templates/install.rb +1 -0
  23. data/lib/motor.rb +1 -0
  24. data/lib/motor/active_record_utils.rb +2 -1
  25. data/lib/motor/active_record_utils/active_record_connection_column_patch.rb +13 -0
  26. data/lib/motor/active_record_utils/{active_record_filter.rb → active_record_filter_patch.rb} +0 -0
  27. data/lib/motor/admin.rb +21 -0
  28. data/lib/motor/api_query.rb +2 -2
  29. data/lib/motor/api_query/build_json.rb +101 -47
  30. data/lib/motor/api_query/filter.rb +2 -0
  31. data/lib/motor/api_query/search.rb +1 -0
  32. data/lib/motor/assets.rb +10 -1
  33. data/lib/motor/build_schema.rb +3 -1
  34. data/lib/motor/build_schema/active_storage_attachment_schema.rb +1 -0
  35. data/lib/motor/build_schema/apply_permissions.rb +50 -0
  36. data/lib/motor/build_schema/find_display_column.rb +1 -0
  37. data/lib/motor/build_schema/find_icon.rb +5 -1
  38. data/lib/motor/cancan_utils.rb +7 -0
  39. data/lib/motor/cancan_utils/ability_patch.rb +29 -0
  40. data/lib/motor/cancan_utils/can_manage_all.rb +14 -0
  41. data/lib/motor/configs/build_ui_app_tag.rb +26 -16
  42. data/lib/motor/configs/load_from_cache.rb +20 -8
  43. data/lib/motor/queries/render_sql_template.rb +12 -2
  44. data/lib/motor/queries/run_query.rb +73 -19
  45. data/lib/motor/version.rb +1 -1
  46. data/ui/dist/main-fd0f75f789196ce24ffd.css.gz +0 -0
  47. data/ui/dist/main-fd0f75f789196ce24ffd.js.gz +0 -0
  48. data/ui/dist/manifest.json +5 -5
  49. metadata +14 -8
  50. data/app/controllers/motor/schemas_controller.rb +0 -11
  51. data/ui/dist/main-4d659b311d92611ad5f6.css.gz +0 -0
  52. data/ui/dist/main-4d659b311d92611ad5f6.js.gz +0 -0
@@ -55,6 +55,7 @@ module Motor
55
55
  def fetch_column_names(model)
56
56
  model.columns.map do |column|
57
57
  next unless column.type.in?(BuildSchema::SEARCHABLE_COLUMN_TYPES)
58
+ next if column.respond_to?(:array?) && column.array?
58
59
 
59
60
  column.name
60
61
  end.compact
@@ -35,6 +35,7 @@ module Motor
35
35
  'token' => 'key',
36
36
  'secret' => 'lock',
37
37
  'automation' => 'manual-gearbox',
38
+ 'workflow' => 'manual-gearbox',
38
39
  'relationship' => 'hierarchy',
39
40
  'person' => 'user',
40
41
  'people' => 'users',
@@ -96,6 +97,8 @@ module Motor
96
97
  'page' => 'brand-pagekit',
97
98
  'date' => 'calendar-event',
98
99
  'customer' => 'users',
100
+ 'client' => 'users',
101
+ 'ticket' => 'ticket',
99
102
  'contact' => 'users',
100
103
  'member' => 'users',
101
104
  'admin' => 'user-check',
@@ -107,7 +110,8 @@ module Motor
107
110
  'product' => 'building-store',
108
111
  'html' => 'code',
109
112
  'stripe' => 'brand-stripe',
110
- 'email' => 'mail'
113
+ 'email' => 'mail',
114
+ 'status' => 'hash'
111
115
  }.freeze
112
116
 
113
117
  DEFAULT_ICON = 'database'
@@ -0,0 +1,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ module CancanUtils
4
+ end
5
+
6
+ require_relative './cancan_utils/ability_patch'
7
+ require_relative './cancan_utils/can_manage_all'
@@ -0,0 +1,29 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Motor
4
+ module CancanUtils
5
+ module AbilityPatch
6
+ def serialized_rules
7
+ @rules.map do |rule|
8
+ {
9
+ base_behavior: rule.base_behavior,
10
+ actions: expand_actions(rule.actions),
11
+ subjects: rule.subjects.map(&:to_s),
12
+ attributes: rule.attributes,
13
+ conditions: rule.conditions.as_json
14
+ }
15
+ end
16
+ end
17
+
18
+ def rules_hash
19
+ serialized_rules.hash
20
+ end
21
+
22
+ private
23
+
24
+ def default_alias_actions
25
+ super.merge(destroy: %i[remove delete])
26
+ end
27
+ end
28
+ end
29
+ end
@@ -0,0 +1,14 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Motor
4
+ module CancanUtils
5
+ class CanManageAll
6
+ include CanCan::Ability
7
+ prepend CancanUtils::AbilityPatch
8
+
9
+ def initialize(_ = nil)
10
+ can :manage, :all
11
+ end
12
+ end
13
+ end
14
+ end
@@ -12,57 +12,67 @@ module Motor
12
12
 
13
13
  module_function
14
14
 
15
- def call(current_user = nil)
15
+ def call(current_user = nil, current_ability = nil)
16
16
  cache_keys = LoadFromCache.load_cache_keys
17
17
 
18
18
  CACHE_STORE.fetch("#{cache_keys.hash}#{current_user&.id}") do
19
19
  CACHE_STORE.clear
20
20
 
21
- Motor::ApplicationController.helpers.tag.div('', id: 'app', data: build_data(cache_keys, current_user))
21
+ data = build_data(cache_keys, current_user, current_ability)
22
+ Motor::ApplicationController.helpers.tag.div('', id: 'app', data: data)
22
23
  end
23
24
  end
24
25
 
25
26
  # @return [Hash]
26
- def build_data(cache_keys = {}, current_user = nil)
27
+ def build_data(cache_keys = {}, current_user = nil, current_ability = nil)
27
28
  {
28
29
  current_user: current_user&.as_json(only: %i[id email]),
30
+ current_rules: current_ability.serialized_rules,
29
31
  audits_count: Motor::Audit.count,
30
32
  base_path: Motor::Admin.routes.url_helpers.motor_path,
31
- schema: Motor::BuildSchema.call(cache_keys),
33
+ schema: Motor::BuildSchema.call(cache_keys, current_ability),
32
34
  header_links: header_links_data_hash(cache_keys[:configs]),
33
- queries: queries_data_hash(cache_keys[:queries]),
34
- dashboards: dashboards_data_hash(cache_keys[:dashboards]),
35
- alerts: alerts_data_hash(cache_keys[:alerts]),
36
- forms: forms_data_hash(cache_keys[:forms])
35
+ queries: queries_data_hash(build_cache_key(cache_keys, :queries, current_user, current_ability),
36
+ current_ability),
37
+ dashboards: dashboards_data_hash(build_cache_key(cache_keys, :dashboards, current_user, current_ability),
38
+ current_ability),
39
+ alerts: alerts_data_hash(build_cache_key(cache_keys, :alerts, current_user, current_ability),
40
+ current_ability),
41
+ forms: forms_data_hash(build_cache_key(cache_keys, :forms, current_user, current_ability), current_ability)
37
42
  }
38
43
  end
39
44
 
45
+ # @return [String]
46
+ def build_cache_key(cache_keys, key, current_user, current_ability)
47
+ "#{cache_keys[key].hash}#{current_user&.id}#{current_ability&.rules_hash}"
48
+ end
49
+
40
50
  def header_links_data_hash(cache_key = nil)
41
51
  configs = Motor::Configs::LoadFromCache.load_configs(cache_key: cache_key)
42
52
 
43
53
  configs.find { |c| c.key == 'header.links' }&.value || []
44
54
  end
45
55
 
46
- def queries_data_hash(cache_key = nil)
47
- Motor::Configs::LoadFromCache.load_queries(cache_key: cache_key)
56
+ def queries_data_hash(cache_key = nil, current_ability = nil)
57
+ Motor::Configs::LoadFromCache.load_queries(cache_key: cache_key, current_ability: current_ability)
48
58
  .as_json(only: %i[id name updated_at],
49
59
  include: { tags: { only: %i[id name] } })
50
60
  end
51
61
 
52
- def dashboards_data_hash(cache_key = nil)
53
- Motor::Configs::LoadFromCache.load_dashboards(cache_key: cache_key)
62
+ def dashboards_data_hash(cache_key = nil, current_ability = nil)
63
+ Motor::Configs::LoadFromCache.load_dashboards(cache_key: cache_key, current_ability: current_ability)
54
64
  .as_json(only: %i[id title updated_at],
55
65
  include: { tags: { only: %i[id name] } })
56
66
  end
57
67
 
58
- def alerts_data_hash(cache_key = nil)
59
- Motor::Configs::LoadFromCache.load_alerts(cache_key: cache_key)
68
+ def alerts_data_hash(cache_key = nil, current_ability = nil)
69
+ Motor::Configs::LoadFromCache.load_alerts(cache_key: cache_key, current_ability: current_ability)
60
70
  .as_json(only: %i[id name is_enabled updated_at],
61
71
  include: { tags: { only: %i[id name] } })
62
72
  end
63
73
 
64
- def forms_data_hash(cache_key = nil)
65
- Motor::Configs::LoadFromCache.load_forms(cache_key: cache_key)
74
+ def forms_data_hash(cache_key = nil, current_ability = nil)
75
+ Motor::Configs::LoadFromCache.load_forms(cache_key: cache_key, current_ability: current_ability)
66
76
  .as_json(only: %i[id name updated_at],
67
77
  include: { tags: { only: %i[id name] } })
68
78
  end
@@ -32,27 +32,39 @@ module Motor
32
32
  end
33
33
  end
34
34
 
35
- def load_queries(cache_key: nil)
35
+ def load_queries(cache_key: nil, current_ability: nil)
36
36
  maybe_fetch_from_cache('queries', cache_key) do
37
- Motor::Query.all.active.preload(:tags).load
37
+ rel = Motor::Query.all.active.preload(:tags)
38
+ rel = rel.accessible_by(current_ability) if current_ability
39
+
40
+ rel.load
38
41
  end
39
42
  end
40
43
 
41
- def load_dashboards(cache_key: nil)
44
+ def load_dashboards(cache_key: nil, current_ability: nil)
42
45
  maybe_fetch_from_cache('dashboards', cache_key) do
43
- Motor::Dashboard.all.active.preload(:tags).load
46
+ rel = Motor::Dashboard.all.active.preload(:tags)
47
+ rel = rel.accessible_by(current_ability) if current_ability
48
+
49
+ rel.load
44
50
  end
45
51
  end
46
52
 
47
- def load_alerts(cache_key: nil)
53
+ def load_alerts(cache_key: nil, current_ability: nil)
48
54
  maybe_fetch_from_cache('alerts', cache_key) do
49
- Motor::Alert.all.active.preload(:tags).load
55
+ rel = Motor::Alert.all.active.preload(:tags)
56
+ rel = rel.accessible_by(current_ability) if current_ability
57
+
58
+ rel.load
50
59
  end
51
60
  end
52
61
 
53
- def load_forms(cache_key: nil)
62
+ def load_forms(cache_key: nil, current_ability: nil)
54
63
  maybe_fetch_from_cache('forms', cache_key) do
55
- Motor::Form.all.active.preload(:tags).load
64
+ rel = Motor::Form.all.active.preload(:tags)
65
+ rel = rel.accessible_by(current_ability) if current_ability
66
+
67
+ rel.load
56
68
  end
57
69
  end
58
70
 
@@ -22,9 +22,19 @@ module Motor
22
22
  variable_name = Regexp.last_match[1]
23
23
 
24
24
  index = selected_variables.index { |name, _| name == variable_name }
25
- selected_variables << [variable_name, variables[variable_name]] unless index
25
+ variable_values = variables[variable_name]
26
26
 
27
- "$#{selected_variables.size}"
27
+ if variable_values.is_a?(Array)
28
+ first_variable_index = selected_variables.size + 1
29
+
30
+ variable_values.each { |value| selected_variables << [variable_name, value] } unless index
31
+
32
+ (first_variable_index..selected_variables.size).map { |i| "$#{i}" }.join(', ')
33
+ else
34
+ selected_variables << [variable_name, variables[variable_name]] unless index
35
+
36
+ "$#{selected_variables.size}"
37
+ end
28
38
  end
29
39
 
30
40
  [rendered, selected_variables]
@@ -7,25 +7,33 @@ module Motor
7
7
 
8
8
  QueryResult = Struct.new(:data, :columns, :error, keyword_init: true)
9
9
 
10
- WITH_STATEMENT_START = 'WITH __query__ AS ('
10
+ CTE_NAME = '__query__'
11
+
12
+ WITH_STATEMENT_START = "WITH #{CTE_NAME} AS ("
11
13
 
12
14
  WITH_STATEMENT_TEMPLATE = <<~SQL
13
15
  #{WITH_STATEMENT_START}%<sql_body>s
14
- ) SELECT * FROM __query__ LIMIT %<limit>s;
16
+ )
15
17
  SQL
16
18
 
19
+ STATEMENT_VARIABLE_REGEXP = /\$\d+/.freeze
17
20
  PG_ERROR_REGEXP = /\APG.+ERROR:/.freeze
18
21
 
22
+ RESERVED_VARIABLES = %w[current_user_id current_user_email].freeze
23
+
19
24
  module_function
20
25
 
21
26
  # @param query [Motor::Query]
22
27
  # @param variables_hash [Hash]
23
28
  # @param limit [Integer]
29
+ # @param filters [Hash]
24
30
  # @return [Motor::Queries::RunQuery::QueryResult]
25
- def call!(query, variables_hash: nil, limit: DEFAULT_LIMIT)
31
+ def call!(query, variables_hash: nil, limit: nil, filters: nil)
26
32
  variables_hash ||= {}
33
+ limit ||= DEFAULT_LIMIT
34
+ filters ||= {}
27
35
 
28
- result = execute_query(query, limit, variables_hash)
36
+ result = execute_query(query, limit, variables_hash, filters)
29
37
 
30
38
  QueryResult.new(data: result.rows, columns: build_columns_hash(result))
31
39
  end
@@ -34,8 +42,8 @@ module Motor
34
42
  # @param variables_hash [Hash]
35
43
  # @param limit [Integer]
36
44
  # @return [Motor::Queries::RunQuery::QueryResult]
37
- def call(query, variables_hash: nil, limit: DEFAULT_LIMIT)
38
- call!(query, variables_hash: variables_hash, limit: limit)
45
+ def call(query, variables_hash: nil, limit: nil, filters: nil)
46
+ call!(query, variables_hash: variables_hash, limit: limit, filters: filters)
39
47
  rescue ActiveRecord::StatementInvalid => e
40
48
  QueryResult.new(error: build_error_message(e))
41
49
  end
@@ -49,10 +57,11 @@ module Motor
49
57
  # @param query [Motor::Query]
50
58
  # @param limit [Integer]
51
59
  # @param variables_hash [Hash]
60
+ # @param filters [Hash]
52
61
  # @return [ActiveRecord::Result]
53
- def execute_query(query, limit, variables_hash)
62
+ def execute_query(query, limit, variables_hash, filters)
54
63
  result = nil
55
- statement = prepare_sql_statement(query, limit, variables_hash)
64
+ statement = prepare_sql_statement(query, limit, variables_hash, filters)
56
65
 
57
66
  ActiveRecord::Base.transaction do
58
67
  result =
@@ -60,6 +69,8 @@ module Motor
60
69
  when 'ActiveRecord::ConnectionAdapters::PostgreSQLAdapter'
61
70
  PostgresqlExecQuery.call(ActiveRecord::Base.connection, statement)
62
71
  else
72
+ statement = normalize_statement_for_sql(statement)
73
+
63
74
  ActiveRecord::Base.connection.exec_query(*statement)
64
75
  end
65
76
 
@@ -86,35 +97,78 @@ module Motor
86
97
  # @param query [Motor::Query]
87
98
  # @param limit [Integer]
88
99
  # @param variables_hash [Hash]
100
+ # @param filters [Hash]
89
101
  # @return [Array]
90
- def prepare_sql_statement(query, limit, variables_hash)
102
+ def prepare_sql_statement(query, limit, variables_hash, filters)
91
103
  variables = merge_variable_default_values(query.preferences.fetch(:variables, []), variables_hash)
92
104
 
93
105
  sql, query_variables = RenderSqlTemplate.call(query.sql_body, variables)
106
+ cte_sql = format(WITH_STATEMENT_TEMPLATE, sql_body: sql.strip.delete_suffix(';'))
107
+ cte_select_sql = build_cte_select_sql(limit, filters)
94
108
 
95
109
  attributes = build_statement_attributes(query_variables)
96
110
 
97
- [format(WITH_STATEMENT_TEMPLATE, sql_body: sql.strip.delete_suffix(';'), limit: limit), 'SQL', attributes]
111
+ [[cte_sql, cte_select_sql].join, 'SQL', attributes]
112
+ end
113
+
114
+ # @param limit [Number]
115
+ # @param filters [Hash]
116
+ # @return [String]
117
+ def build_cte_select_sql(limit, filters)
118
+ table = Arel::Table.new(CTE_NAME)
119
+
120
+ arel_filters = build_filters_arel(filters)
121
+
122
+ expresion = table.project(table[Arel.star])
123
+ expresion = expresion.where(arel_filters) if arel_filters.present?
124
+
125
+ expresion.take(limit.to_i).to_sql
126
+ end
127
+
128
+ # @param filters [Hash]
129
+ # @return [Arel::Nodes, nil]
130
+ def build_filters_arel(filters)
131
+ return nil if filters.blank?
132
+
133
+ table = Arel::Table.new(CTE_NAME)
134
+
135
+ arel_filters = filters.map { |key, value| table[key].in(value) }
136
+
137
+ arel_filters[1..].reduce(arel_filters.first) { |acc, arel| acc.and(arel) }
98
138
  end
99
139
 
100
140
  # @param variables [Array<(String, Object)>]
101
141
  # @return [Array<ActiveRecord::Relation::QueryAttribute>]
102
142
  def build_statement_attributes(variables)
103
143
  variables.map do |variable_name, value|
104
- ActiveRecord::Relation::QueryAttribute.new(
105
- variable_name,
106
- value,
107
- ActiveRecord::Type::Value.new
108
- )
109
- end
144
+ [value].flatten.map do |val|
145
+ ActiveRecord::Relation::QueryAttribute.new(
146
+ variable_name,
147
+ val,
148
+ ActiveRecord::Type::Value.new
149
+ )
150
+ end
151
+ end.flatten
152
+ end
153
+
154
+ # @param array [Array]
155
+ # @return [Array]
156
+ def normalize_statement_for_sql(statement)
157
+ sql, _, attributes = statement
158
+
159
+ sql = ActiveRecord::Base.sanitize_sql([sql.gsub(STATEMENT_VARIABLE_REGEXP, '?'), attributes.map(&:value)])
160
+
161
+ [sql, 'SQL', attributes]
110
162
  end
111
163
 
112
164
  # @param variable_configs [Array<Hash>]
113
- # @param variable_hash [Hash]
165
+ # @param variables_hash [Hash]
114
166
  # @return [Hash]
115
167
  def merge_variable_default_values(variable_configs, variables_hash)
116
- variable_configs.each_with_object({}) do |variable, acc|
117
- acc[variable[:name]] = variables_hash[variable[:name]] || variable[:default_value]
168
+ variable_configs.each_with_object(variables_hash.slice(*RESERVED_VARIABLES)) do |variable, acc|
169
+ next if RESERVED_VARIABLES.include?(variable[:name])
170
+
171
+ acc[variable[:name]] ||= variables_hash[variable[:name]] || variable[:default_value]
118
172
  end
119
173
  end
120
174
  end
data/lib/motor/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Motor
4
- VERSION = '0.1.55'
4
+ VERSION = '0.1.61'
5
5
  end
@@ -2068,11 +2068,11 @@
2068
2068
  "mail-opened.svg": "icons/mail-opened.svg",
2069
2069
  "mail.svg": "icons/mail.svg",
2070
2070
  "mailbox.svg": "icons/mailbox.svg",
2071
- "main-4d659b311d92611ad5f6.css.gz": "main-4d659b311d92611ad5f6.css.gz",
2072
- "main-4d659b311d92611ad5f6.js.LICENSE.txt": "main-4d659b311d92611ad5f6.js.LICENSE.txt",
2073
- "main-4d659b311d92611ad5f6.js.gz": "main-4d659b311d92611ad5f6.js.gz",
2074
- "main.css": "main-4d659b311d92611ad5f6.css",
2075
- "main.js": "main-4d659b311d92611ad5f6.js",
2071
+ "main-fd0f75f789196ce24ffd.css.gz": "main-fd0f75f789196ce24ffd.css.gz",
2072
+ "main-fd0f75f789196ce24ffd.js.LICENSE.txt": "main-fd0f75f789196ce24ffd.js.LICENSE.txt",
2073
+ "main-fd0f75f789196ce24ffd.js.gz": "main-fd0f75f789196ce24ffd.js.gz",
2074
+ "main.css": "main-fd0f75f789196ce24ffd.css",
2075
+ "main.js": "main-fd0f75f789196ce24ffd.js",
2076
2076
  "man.svg": "icons/man.svg",
2077
2077
  "manual-gearbox.svg": "icons/manual-gearbox.svg",
2078
2078
  "map-2.svg": "icons/map-2.svg",
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: motor-admin
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.55
4
+ version: 0.1.61
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pete Matsyburka
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-06-01 00:00:00.000000000 Z
11
+ date: 2021-06-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord-filter
@@ -44,14 +44,14 @@ dependencies:
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '4.9'
47
+ version: '5.0'
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: '4.9'
54
+ version: '5.0'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: cancancan
57
57
  requirement: !ruby/object:Gem::Requirement
@@ -121,6 +121,7 @@ files:
121
121
  - LICENSE
122
122
  - README.md
123
123
  - Rakefile
124
+ - app/controllers/concerns/motor/current_ability.rb
124
125
  - app/controllers/concerns/motor/current_user_method.rb
125
126
  - app/controllers/concerns/motor/load_and_authorize_dynamic_resource.rb
126
127
  - app/controllers/concerns/motor/wrap_io_params.rb
@@ -130,6 +131,7 @@ files:
130
131
  - app/controllers/motor/application_controller.rb
131
132
  - app/controllers/motor/assets_controller.rb
132
133
  - app/controllers/motor/audits_controller.rb
134
+ - app/controllers/motor/auth_tokens_controller.rb
133
135
  - app/controllers/motor/configs_controller.rb
134
136
  - app/controllers/motor/dashboards_controller.rb
135
137
  - app/controllers/motor/data_controller.rb
@@ -139,7 +141,6 @@ files:
139
141
  - app/controllers/motor/resource_methods_controller.rb
140
142
  - app/controllers/motor/resources_controller.rb
141
143
  - app/controllers/motor/run_queries_controller.rb
142
- - app/controllers/motor/schemas_controller.rb
143
144
  - app/controllers/motor/send_alerts_controller.rb
144
145
  - app/controllers/motor/tags_controller.rb
145
146
  - app/controllers/motor/ui_controller.rb
@@ -168,7 +169,8 @@ files:
168
169
  - lib/motor-admin.rb
169
170
  - lib/motor.rb
170
171
  - lib/motor/active_record_utils.rb
171
- - lib/motor/active_record_utils/active_record_filter.rb
172
+ - lib/motor/active_record_utils/active_record_connection_column_patch.rb
173
+ - lib/motor/active_record_utils/active_record_filter_patch.rb
172
174
  - lib/motor/active_record_utils/active_storage_blob_patch.rb
173
175
  - lib/motor/active_record_utils/active_storage_links_extension.rb
174
176
  - lib/motor/active_record_utils/defined_scopes_extension.rb
@@ -191,6 +193,7 @@ files:
191
193
  - lib/motor/build_schema.rb
192
194
  - lib/motor/build_schema/active_storage_attachment_schema.rb
193
195
  - lib/motor/build_schema/adjust_devise_model_schema.rb
196
+ - lib/motor/build_schema/apply_permissions.rb
194
197
  - lib/motor/build_schema/find_display_column.rb
195
198
  - lib/motor/build_schema/find_icon.rb
196
199
  - lib/motor/build_schema/load_from_rails.rb
@@ -198,6 +201,9 @@ files:
198
201
  - lib/motor/build_schema/persist_resource_configs.rb
199
202
  - lib/motor/build_schema/reorder_schema.rb
200
203
  - lib/motor/build_schema/utils.rb
204
+ - lib/motor/cancan_utils.rb
205
+ - lib/motor/cancan_utils/ability_patch.rb
206
+ - lib/motor/cancan_utils/can_manage_all.rb
201
207
  - lib/motor/configs.rb
202
208
  - lib/motor/configs/build_configs_hash.rb
203
209
  - lib/motor/configs/build_ui_app_tag.rb
@@ -1485,8 +1491,8 @@ files:
1485
1491
  - ui/dist/icons/zoom-money.svg.gz
1486
1492
  - ui/dist/icons/zoom-out.svg.gz
1487
1493
  - ui/dist/icons/zoom-question.svg.gz
1488
- - ui/dist/main-4d659b311d92611ad5f6.css.gz
1489
- - ui/dist/main-4d659b311d92611ad5f6.js.gz
1494
+ - ui/dist/main-fd0f75f789196ce24ffd.css.gz
1495
+ - ui/dist/main-fd0f75f789196ce24ffd.js.gz
1490
1496
  - ui/dist/manifest.json
1491
1497
  homepage:
1492
1498
  licenses: