Skip to content

Commit 5606659

Browse files
authored
Merge branch 'main' into copilot/update-pscmdlet-throwterminatingerror
2 parents 29df2fb + a2ec8dc commit 5606659

File tree

6 files changed

+1030
-851
lines changed

6 files changed

+1030
-851
lines changed

CHANGELOG.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
### Added
99

10+
- `Set-SqlDscServerPermission`
11+
- Added integration tests for negative test scenarios including invalid
12+
permission names and non-existent principals.
1013
- `SqlPermission`
1114
- Added integration tests for server role permissions to complement the
1215
existing login permission tests.
@@ -38,6 +41,18 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
3841
and server roles as principals.
3942
- Added a note in documentation clarifying that if a name exists as both
4043
a login and a server role, the login will take precedence.
44+
- BREAKING CHANGE: `Set-SqlDscServerPermission`
45+
- Completely refactored to set exact server permissions for a principal. The
46+
command now accepts Login or ServerRole objects (same as `Grant-SqlDscServerPermission`,
47+
`Deny-SqlDscServerPermission`, and `Revoke-SqlDscServerPermission`) and uses
48+
`-Grant`, `-GrantWithGrant`, and `-Deny` parameters to specify the exact
49+
permissions that should exist within each specified category. Within a
50+
specified category, any existing permissions not listed are revoked;
51+
categories not specified are left unchanged. The command internally uses
52+
`Get-SqlDscServerPermission`, `Grant-SqlDscServerPermission`,
53+
`Deny-SqlDscServerPermission`, and `Revoke-SqlDscServerPermission` to
54+
achieve this
55+
([issue #2159](https://github.com/dsccommunity/SqlServerDsc/issues/2159)).
4156
- Updated comment-based help `.INPUTS` and `.OUTPUTS` sections across all public
4257
commands and private functions to comply with DSC community style guidelines
4358
([issue #2103](https://github.com/dsccommunity/SqlServerDsc/issues/2103)).
@@ -50,6 +65,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
5065

5166
### Fixed
5267

68+
- `Set-SqlDscServerPermission`
69+
- Fixed an issue where unspecified permission parameters would incorrectly
70+
revoke existing permissions. The command now only processes permission
71+
categories that are explicitly specified via parameters. For example,
72+
specifying only `-Grant @()` will now correctly revoke only Grant permissions
73+
while leaving GrantWithGrant and Deny permissions unchanged
74+
([issue #2159](https://github.com/dsccommunity/SqlServerDsc/issues/2159)).
5375
- `New-SqlDscDatabase`
5476
- Fixed parameter types for database-scoped configuration properties from
5577
`System.Boolean` to `Microsoft.SqlServer.Management.Smo.DatabaseScopedConfigurationOnOff`

0 commit comments

Comments
 (0)