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 +4 -4
- data/Gemfile.lock +1 -1
- data/app/controllers/avo/media_library_controller.rb +8 -0
- data/lib/avo/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 0f28594c5b85e9c195d101136003422d6ddc321255474393a02313a54cc0aa86
|
|
4
|
+
data.tar.gz: 9e483c35a6ca7cddc0173c63526bed3370d7a81d3d7f356813a98e838c11664e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c5b5123b31107a6acc2456f46d36982af364f665b9593a23cdfc8f45f2edbe32bcc01448dccdbbe406f0c6ae5b3c49bd021e795d2baabbb81cc560228cc84843
|
|
7
|
+
data.tar.gz: cb4c91879fb962f4a0267a60e768ff2f49ce915a361201564a4b5325797839dcebf99a8ad9acfa13dd06cbac72ad361916bbc105aa06d8af4ccb15f38e4447d6
|
data/Gemfile.lock
CHANGED
|
@@ -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