Skip to content

Commit 41f5bc4

Browse files
committed
[BB-906] baton-sql-server: delete users instead of disabling users when we do account deprovisioning
1 parent b4c84f1 commit 41f5bc4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pkg/mssqldb/server.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,13 @@ func (c *Client) GetServer(ctx context.Context) (*ServerModel, error) {
3535
return &ret, nil
3636
}
3737

38-
func (c *Client) DisableUserFromServer(ctx context.Context, userName string) error {
38+
func (c *Client) DeleteUserFromServer(ctx context.Context, userName string) error {
3939
if strings.ContainsAny(userName, "[]\"';") {
4040
return fmt.Errorf("invalid characters in userName")
4141
}
4242

4343
query := fmt.Sprintf(`
44-
ALTER LOGIN [%s] DISABLE;`, userName)
44+
DROP LOGIN [%s];`, userName)
4545

4646
_, err := c.db.ExecContext(ctx, query)
4747
if err != nil {

0 commit comments

Comments
 (0)