avo 2.30.1.pre2.pr1683 → 2.30.1.pre4.pr1683
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of avo might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/app/components/avo/fields/common/files/list_viewer_component.html.erb +1 -1
- data/app/components/avo/fields/common/files/list_viewer_component.rb +1 -1
- data/app/controllers/avo/attachments_controller.rb +1 -3
- data/lib/avo/configuration.rb +1 -1
- data/lib/avo/fields/concerns/file_authorization.rb +1 -1
- data/lib/avo/fields/files_field.rb +2 -2
- data/lib/avo/version.rb +1 -1
- data/lib/generators/avo/templates/initializer/avo.tt +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7026eb5ccd2fa76aab49f686e6e3d87e310e54ed6d220aab367c87283690d29e
|
4
|
+
data.tar.gz: 3de5de591bb61c2d022eb71e25b08cceb225dc5af6f92ba2d4431abf594bbe45
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 005c54601761b2d69acea075c89a433c9a170d591db6e7d3cfdfd6b7cc75d36d87eee9eedec207aea59413c6ebc9efebed14896e5ed2a51eb46bfbd532a8c4e7
|
7
|
+
data.tar.gz: 89376982016bd362d2148cd57244fe9e8c3b5e998f081f3b34557e484a09e55c7d7370a22d2f7047bb418813c5edc7b7b124284a53a7eb58c59481183cb0229f
|
data/Gemfile.lock
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
<%= content_tag :div, class: wrapper_classes do %>
|
2
2
|
<%= turbo_frame_tag @field.id do %>
|
3
|
-
<% unless @field.
|
3
|
+
<% unless @field.hide_view_type_switcher %>
|
4
4
|
<div class="justify-self-end flex justify-end items-center space-x-3">
|
5
5
|
<%= render partial: 'avo/partials/view_toggle_button', locals: { available_view_types: available_view_types, view_type: @field.view_type, turbo_frame: @field.id } %>
|
6
6
|
</div>
|
@@ -40,9 +40,7 @@ module Avo
|
|
40
40
|
private
|
41
41
|
|
42
42
|
def authorized_to(action)
|
43
|
-
|
44
|
-
@resource.authorization.authorize_action("#{action}_#{params[:attachment_name]}?", record: @model, raise_exception: false)
|
45
|
-
end
|
43
|
+
@resource.authorization.authorize_action("#{action}_#{params[:attachment_name]}?", record: @model, raise_exception: false)
|
46
44
|
end
|
47
45
|
end
|
48
46
|
end
|
data/lib/avo/configuration.rb
CHANGED
@@ -71,7 +71,7 @@ module Avo
|
|
71
71
|
@id_links_to_resource = false
|
72
72
|
@full_width_container = false
|
73
73
|
@full_width_index_view = false
|
74
|
-
@cache_resources_on_index_view =
|
74
|
+
@cache_resources_on_index_view = false
|
75
75
|
@cache_resource_filters = false
|
76
76
|
@context = proc {}
|
77
77
|
@initial_breadcrumbs = proc {
|
@@ -23,7 +23,7 @@ module Avo
|
|
23
23
|
private
|
24
24
|
|
25
25
|
def authorize_file_action(action)
|
26
|
-
authorize_action("#{action}
|
26
|
+
authorize_action("#{action}_#{id}?", record: model, raise_exception: false)
|
27
27
|
end
|
28
28
|
end
|
29
29
|
end
|
@@ -6,7 +6,7 @@ module Avo
|
|
6
6
|
attr_accessor :direct_upload
|
7
7
|
attr_accessor :accept
|
8
8
|
attr_reader :display_filename
|
9
|
-
attr_reader :
|
9
|
+
attr_reader :hide_view_type_switcher
|
10
10
|
|
11
11
|
def initialize(id, **args, &block)
|
12
12
|
super(id, **args, &block)
|
@@ -17,7 +17,7 @@ module Avo
|
|
17
17
|
@accept = args[:accept].present? ? args[:accept] : nil
|
18
18
|
@display_filename = args[:display_filename].nil? ? true : args[:display_filename]
|
19
19
|
@view_type = args[:view_type] || :grid
|
20
|
-
@
|
20
|
+
@hide_view_type_switcher = args[:hide_view_type_switcher]
|
21
21
|
end
|
22
22
|
|
23
23
|
def view_component_name
|
data/lib/avo/version.rb
CHANGED
@@ -47,7 +47,7 @@ Avo.configure do |config|
|
|
47
47
|
# config.per_page_steps = [12, 24, 48, 72]
|
48
48
|
# config.via_per_page = 8
|
49
49
|
# config.id_links_to_resource = false
|
50
|
-
# config.cache_resources_on_index_view =
|
50
|
+
# config.cache_resources_on_index_view = false
|
51
51
|
## permanent enable or disable cache_resource_filters, default value is false
|
52
52
|
# config.cache_resource_filters = false
|
53
53
|
## provide a lambda to enable or disable cache_resource_filters per user/resource.
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: avo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.30.1.
|
4
|
+
version: 2.30.1.pre4.pr1683
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Adrian Marin
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2023-04-
|
12
|
+
date: 2023-04-17 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activerecord
|