-
-
Notifications
You must be signed in to change notification settings - Fork 2
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
Add Support for PostgreSQL RLS (β Sandbox Passed) #9
base: main
Are you sure you want to change the base?
Conversation
Sandbox Executions
Check ensemble/src/connection.rs with contents:
Check ensemble/src/lib.rs with contents:
Check ensemble/src/tests/connection_tests.rs with contents: |
Apply Sweep Rules to your PR?
|
The command: error[E0308]: mismatched types error[E0308]: mismatched types For more information about this error, try
|
π Wrote ChangesDone. |
PR Feedback (click)
Description
This pull request adds support for PostgreSQL Row-Level Security (RLS) to the ensemble library. It introduces a new
assume_role
method to theModel
trait, allowing models to assume a role for the duration of a session. Additionally, it modifies thesetup
andget
functions in theconnection
module to accept an optional role parameter, and updates theall
,find
,create
, andsave
methods in theModel
trait to callassume_role
before executing their respective logic.Summary
assume_role
method to theModel
trait, allowing models to assume a role for the duration of a session.setup
function in theconnection
module to accept an optional role parameter.get
function in theconnection
module to callassume_role
before returning a connection.all
,find
,create
, andsave
methods in theModel
trait to callassume_role
before executing their respective logic.connection_tests
module.Fixes #7.
π Latest improvements to Sweep:
π‘ To get Sweep to edit this pull request, you can: