Skip to content

chore: grant mixin and normalize#5447

Merged
eakmanrq merged 1 commit intoddai/grantsfrom
eakmanrq/grant_mixin_and_normalize
Sep 29, 2025
Merged

chore: grant mixin and normalize#5447
eakmanrq merged 1 commit intoddai/grantsfrom
eakmanrq/grant_mixin_and_normalize

Conversation

@eakmanrq
Copy link
Collaborator

Creates a mixin for grants that are using the information schema in order to share common logic.

Also properly normalizes the Grant Principle which is why there are quotes around the identifiers now.

@eakmanrq eakmanrq force-pushed the eakmanrq/grant_mixin_and_normalize branch 3 times, most recently from 4d54568 to c291761 Compare September 26, 2025 23:48
assert 'GRANT INSERT ON "test_schema"."test_table" TO user3' in sql_calls
assert 'REVOKE SELECT ON "test_schema"."test_table" FROM old_user' in sql_calls
assert 'REVOKE UPDATE ON "test_schema"."test_table" FROM admin_user' in sql_calls
assert 'GRANT SELECT ON "test_schema"."test_table" TO "user1", "user2"' in sql_calls
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, the previous implementation that didn't quote was asking for trouble

@eakmanrq eakmanrq force-pushed the eakmanrq/grant_mixin_and_normalize branch from c291761 to 4564c98 Compare September 29, 2025 15:00
@eakmanrq eakmanrq merged commit 0440ada into ddai/grants Sep 29, 2025
20 of 21 checks passed
@eakmanrq eakmanrq deleted the eakmanrq/grant_mixin_and_normalize branch September 29, 2025 16:25
newtonapple pushed a commit that referenced this pull request Sep 29, 2025
newtonapple pushed a commit that referenced this pull request Sep 30, 2025
newtonapple pushed a commit that referenced this pull request Oct 2, 2025
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.

3 participants