Add Support for PostgreSQL RLS (✓ Sandbox Passed)#9
Add Support for PostgreSQL RLS (✓ Sandbox Passed)#9sweep-ai-deprecated[bot] wants to merge 7 commits intomainfrom
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: