Skip to content

add ability to assign database role to a user - #69

Open
njhowell wants to merge 5 commits into
masterfrom
add_dbrole
Open

add ability to assign database role to a user#69
njhowell wants to merge 5 commits into
masterfrom
add_dbrole

Conversation

@njhowell

Copy link
Copy Markdown
Contributor

This adds a helper to allow us to more easily assign a database role to a given server login.

If a user for the login doesn't exist on the database in question, then it gets created.

njhowell and others added 4 commits July 28, 2026 15:18
The unless guard for assigning a role was missing USE [database], so
IS_ROLEMEMBER ran against the wrong database and the ALTER ROLE
command never actually executed. Also quote identifiers consistently,
use sys.database_principals instead of the deprecated sysusers view,
add a serverspec assertion that the role assignment took effect, and
note why kitchen-vagrant is pinned to a fork.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
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.

2 participants