effective_storage 0.2.1 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ecd6dd02777954598cdab6c48f1f3ca0a97009dd7e34651edabcb08c21f7a59f
4
- data.tar.gz: 239c1873844fa5036a1c62e4c7154bfb1705972eacdf4ebaad3c73900c2da559
3
+ metadata.gz: ddb75c58fe70421e642837cd9af4f53f90d8c4b01d56489d95410b293da9509d
4
+ data.tar.gz: 01dfc8e5af3dc6ce51181989c4d3a30b75295dd384c616ef14dc994f03ca9490
5
5
  SHA512:
6
- metadata.gz: fbdfdbacfb2bc11023c480cc1389a3b28b063fb363b0dedd8d8c7a0daa6784c160366fdce088dd98fccc243388616f7ba669836afc53568feadc74371786c4bf
7
- data.tar.gz: 91e69e42ccc3c1a10e06925f75a9d0e00c96907da53e167e94afc7a0914112508932892a5f4d6b8828f2dd7526c88dfb1d73d9c84dc91f592a25c324e352afe7
6
+ metadata.gz: 9f11e509b1a5a92c007a87178f8bb53b9f6d1a5563fe1d7f14e04b8db13d39c1757197050a79bc6807be703d7257d10424f92d4d1a5f4493f984dd949094f40f
7
+ data.tar.gz: 6eae6952c076bab26ab2a67ffe403d4eb51d0aa9242dcff992fb5473580982fdefff44fa36bc635b52d98f9b8866752e53f9d296037bb9a2136487d6acff94ca
@@ -68,7 +68,7 @@ module ActiveStorageAuthorization
68
68
  return true if @blob.attachments.any? { |attachment| authorized_attachment_download?(attachment) }
69
69
 
70
70
  # Otherwise raise a 403 Forbidden and block the download
71
- head :forbidden
71
+ head(:forbidden, 'X-Robots-Tag': 'noindex')
72
72
 
73
73
  # Raise an exception to log unauthorized request
74
74
  raise_exception()
@@ -98,7 +98,10 @@ module ActiveStorageAuthorization
98
98
  return true if blob.image?
99
99
 
100
100
  # Require sign in to view any attached files
101
- current_user.present?
101
+ # current_user.present?
102
+
103
+ # Let anyone view these files
104
+ true
102
105
  end
103
106
 
104
107
  # This was included and resized in an ActionText::RichText object
@@ -1,3 +1,3 @@
1
1
  module EffectiveStorage
2
- VERSION = '0.2.1'.freeze
2
+ VERSION = '0.3.0'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: effective_storage
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Code and Effect
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-11-07 00:00:00.000000000 Z
11
+ date: 2023-01-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails