-
-
Notifications
You must be signed in to change notification settings - Fork 445
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[4.x] Make forcing RLS configurable #1293
base: master
Are you sure you want to change the base?
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #1293 +/- ##
============================================
+ Coverage 84.68% 85.04% +0.35%
- Complexity 1036 1067 +31
============================================
Files 175 176 +1
Lines 3043 3163 +120
============================================
+ Hits 2577 2690 +113
- Misses 466 473 +7 ☔ View full report in Codecov by Sentry. |
Any news on this? <3 |
// The table owner should see all the records | ||
expect(Order::all())->toHaveCount(2); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In this test, add a dataset for $forceRls
so the difference is actually observed. Assuming createPostgresUser()
creates a user without BYPASSRLS, the change should be simple.
This PR adds the
$forceRls
static property to thetenants:rls
command.If
$forceRls
istrue
(default), the table owners won't be able to query their own tables (unless the owners have the BYPASSRLS privilege). If the property is set tofalse
, table owners will bypass RLS, allowing them to query the owned tables.