pg_rls 0.0.2.6.9 → 0.0.2.6.11
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 961e2929b7e30e78b3900be5b998f918b5ffac245f908ee0d1759fb36f4cdc9f
|
4
|
+
data.tar.gz: 5be148679ce859f8140e10d5d467b4007988a162d6f5f3b812f6996176642c92
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0171035774710f89e5b5b7b46f379eefadbabb681e9edd65faea4b55a741b29b7550921a03704c011406ede9b559223a09bb22846beb1f6d88340be4c180a0e2
|
7
|
+
data.tar.gz: c2d07c0b91cf14714937ccfb3c59fc875e28b83c20c025e87ae31d2d3299298bacbc5b99612023f3c5235ae6d95b12f4b45864e20f17472760b5a6a2f9df11a4
|
@@ -14,7 +14,7 @@ module PgRls
|
|
14
14
|
return @app.call(env) if tenant.blank?
|
15
15
|
|
16
16
|
PgRls::Tenant.with_tenant!(tenant) { @app.call(env) }
|
17
|
-
rescue PgRls::
|
17
|
+
rescue PgRls::Errors::TenantNotFound
|
18
18
|
@app.call(env)
|
19
19
|
rescue ActiveRecord::RecordNotFound => e
|
20
20
|
raise e unless rails_active_storage_request?(env)
|
@@ -37,7 +37,7 @@ module PgRls
|
|
37
37
|
return if cookie.blank?
|
38
38
|
|
39
39
|
sessions = Rails.cache.read("#{PgRls.session_prefix}#{Digest::SHA256.hexdigest(cookie)}")
|
40
|
-
sessions['_tenant']
|
40
|
+
sessions['_tenant'] if sessions.present?
|
41
41
|
end
|
42
42
|
|
43
43
|
def rails_active_storage_request?(env)
|
@@ -6,10 +6,8 @@ module PgRls
|
|
6
6
|
module Sidekiq
|
7
7
|
# Set PgRls Policies
|
8
8
|
class Server
|
9
|
-
def call(_job_instance, msg, _queue)
|
10
|
-
PgRls::Tenant.with_tenant!(msg['pg_rls'])
|
11
|
-
yield
|
12
|
-
end
|
9
|
+
def call(_job_instance, msg, _queue, &)
|
10
|
+
PgRls::Tenant.with_tenant!(msg['pg_rls'], &)
|
13
11
|
end
|
14
12
|
end
|
15
13
|
end
|
data/lib/pg_rls/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pg_rls
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.2.6.
|
4
|
+
version: 0.0.2.6.11
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Daniel Laloush
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-02-
|
11
|
+
date: 2023-02-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|