- 
          
- 
                Notifications
    You must be signed in to change notification settings 
- Fork 2
Add Support for PostgreSQL RLS (β Sandbox Passed) #9
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
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_rolemethod to theModeltrait, allowing models to assume a role for the duration of a session. Additionally, it modifies thesetupandgetfunctions in theconnectionmodule to accept an optional role parameter, and updates theall,find,create, andsavemethods in theModeltrait to callassume_rolebefore executing their respective logic.Summary
assume_rolemethod to theModeltrait, allowing models to assume a role for the duration of a session.setupfunction in theconnectionmodule to accept an optional role parameter.getfunction in theconnectionmodule to callassume_rolebefore returning a connection.all,find,create, andsavemethods in theModeltrait to callassume_rolebefore executing their respective logic.connection_testsmodule.Fixes #7.
π Latest improvements to Sweep:
π‘ To get Sweep to edit this pull request, you can: