Skip to content

Commit dc1c357

Browse files
authored
Merge branch 'main' into fix/issue-#2365
2 parents 0b3fedd + a2ec8dc commit dc1c357

6 files changed

Lines changed: 1031 additions & 851 deletions

CHANGELOG.md

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

88
### Added
99

10+
1011
- Added public command `Backup-SqlDscDatabase` to perform database backups using
1112
SMO's `Microsoft.SqlServer.Management.Smo.Backup` class. Supports full,
1213
differential, and transaction log backups with options for compression,
1314
copy-only, checksum, and retention. Accepts both Server and Database objects
1415
via pipeline
1516
([issue #2365](https://github.com/dsccommunity/SqlServerDsc/issues/2365)).
17+
- `Set-SqlDscServerPermission`
18+
- Added integration tests for negative test scenarios including invalid
19+
permission names and non-existent principals.
1620
- `SqlPermission`
1721
- Added integration tests for server role permissions to complement the
1822
existing login permission tests.
@@ -44,6 +48,18 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
4448
and server roles as principals.
4549
- Added a note in documentation clarifying that if a name exists as both
4650
a login and a server role, the login will take precedence.
51+
- BREAKING CHANGE: `Set-SqlDscServerPermission`
52+
- Completely refactored to set exact server permissions for a principal. The
53+
command now accepts Login or ServerRole objects (same as `Grant-SqlDscServerPermission`,
54+
`Deny-SqlDscServerPermission`, and `Revoke-SqlDscServerPermission`) and uses
55+
`-Grant`, `-GrantWithGrant`, and `-Deny` parameters to specify the exact
56+
permissions that should exist within each specified category. Within a
57+
specified category, any existing permissions not listed are revoked;
58+
categories not specified are left unchanged. The command internally uses
59+
`Get-SqlDscServerPermission`, `Grant-SqlDscServerPermission`,
60+
`Deny-SqlDscServerPermission`, and `Revoke-SqlDscServerPermission` to
61+
achieve this
62+
([issue #2159](https://github.com/dsccommunity/SqlServerDsc/issues/2159)).
4763
- Updated comment-based help `.INPUTS` and `.OUTPUTS` sections across all public
4864
commands and private functions to comply with DSC community style guidelines
4965
([issue #2103](https://github.com/dsccommunity/SqlServerDsc/issues/2103)).
@@ -53,6 +69,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
5369

5470
### Fixed
5571

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

0 commit comments

Comments
 (0)