avo 3.32.3 → 3.32.4

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: '05834f1d3c4b568f0f88d0327792f5ee04005487f97c603e897ba83ff4b3b2de'
4
- data.tar.gz: 1a81b6037ef7e5fd89f73af37156e6ed80cdbd58b6855b8577749208181bfbb6
3
+ metadata.gz: 0f28594c5b85e9c195d101136003422d6ddc321255474393a02313a54cc0aa86
4
+ data.tar.gz: 9e483c35a6ca7cddc0173c63526bed3370d7a81d3d7f356813a98e838c11664e
5
5
  SHA512:
6
- metadata.gz: e433668496f62d26106528664f633a8fa3a6bb98060828ec0b09f6e322fbdec20920093ea0c04ca78bd93e96a3e16ac5c17d021df8228ef88d141f9163ae97bb
7
- data.tar.gz: a41993d8a8ca98d00a5a58d1068be20059d837e151f4dcb328e1b5297c8fdde95b8dd5e746db8d202063a307a9531ac8ddded58827eddda01c7f90a2d603f039
6
+ metadata.gz: c5b5123b31107a6acc2456f46d36982af364f665b9593a23cdfc8f45f2edbe32bcc01448dccdbbe406f0c6ae5b3c49bd021e795d2baabbb81cc560228cc84843
7
+ data.tar.gz: cb4c91879fb962f4a0267a60e768ff2f49ce915a361201564a4b5325797839dcebf99a8ad9acfa13dd06cbac72ad361916bbc105aa06d8af4ccb15f38e4447d6
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- avo (3.32.3)
4
+ avo (3.32.4)
5
5
  actionview (>= 6.1)
6
6
  active_link_to
7
7
  activerecord (>= 6.1)
@@ -1,6 +1,7 @@
1
1
  module Avo
2
2
  class MediaLibraryController < ApplicationController
3
3
  include Pagy::Backend
4
+
4
5
  before_action :authorize_access!
5
6
 
6
7
  def index
@@ -37,6 +38,13 @@ module Avo
37
38
 
38
39
  def authorize_access!
39
40
  raise_404 if Avo::MediaLibrary.configuration.disabled?
41
+
42
+ # `visible` is the per-user gate for the whole feature, not just the
43
+ # sidebar item. It reads like access control -- a block returning false
44
+ # for a user is plainly meant to keep that user out -- so it has to be
45
+ # enforced here, or every Media Library route stays reachable by URL to
46
+ # anyone who can sign in to Avo.
47
+ raise_404 unless Avo::MediaLibrary.configuration.visible?
40
48
  end
41
49
  end
42
50
  end
data/lib/avo/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Avo
2
- VERSION = "3.32.3" unless const_defined?(:VERSION)
2
+ VERSION = "3.32.4" unless const_defined?(:VERSION)
3
3
  end
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: 3.32.3
4
+ version: 3.32.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adrian Marin