Skip to content

feat!: separate role memberships from schema grants - #64

Merged
doublecompile merged 3 commits into
mainfrom
fix-connection-issue
Nov 5, 2026
Merged

doublecompile merged 3 commits into
mainfrom
fix-connection-issue

Conversation

@doublecompile

Copy link
Copy Markdown
Member

createAdminGrants and createReaderGrants no longer take a list of logins or grant role membership. Schema grants require the schema owner, while memberships require ADMIN OPTION on the role, so no single non-superuser connection could run both. Use the new ServerClient.createMemberships on the CREATEROLE connection to grant memberships.

The methods also no longer skip the schema grants when there are no logins.

Fixes #63

createAdminGrants and createReaderGrants no longer take a list of logins or grant role membership. Schema grants require the schema owner, while memberships require ADMIN OPTION on the
role, so no single non-superuser connection could run both. Use the new ServerClient.createMemberships on the CREATEROLE connection to grant memberships.

The methods also no longer skip the schema grants when there are no logins.

Fixes #63
@codecov

codecov Bot commented Nov 5, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (f097c62) to head (43c6aa4).

Additional details and impacted files
@@            Coverage Diff            @@
##              main       #64   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            3         3           
  Lines          701       708    +7     
  Branches        23        85   +62     
=========================================
+ Hits           701       708    +7     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@doublecompile
doublecompile merged commit dce54dc into main Nov 5, 2026
6 checks passed
@doublecompile
doublecompile deleted the fix-connection-issue branch November 5, 2026 18:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

createAdminGrants/createReaderGrants can't succeed on any single non-superuser connection

1 participant