Skip to content

Commit

Permalink
Merge pull request #3581 from wilecoyotegenius/add-enablesensitivityl…
Browse files Browse the repository at this point in the history
…abelforpdf-to-tenant

Add EnableSensitivityLabelForPDF property to Tenant
  • Loading branch information
KoenZomers committed Nov 19, 2023
2 parents 7869836 + 35208f4 commit b0c852b
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
- Added `-BusinessConnectivityServiceDisabled` parameter to `Set-PnPTenant` cmdlt to allow disabling the Business Connectivity Service [#3562](https://github.com/pnp/powershell/pull/3562)
- Added support for executing the 'Invoke-PnPSPRestMethod' cmdlet in a batch [#3565](https://github.com/pnp/powershell/pull/3565)
- Added `Get-PnPSiteSetVersionPolicyProgress` cmdlet which allows for getting the progress of setting a version policy for existing document libraries on a site [#3564](https://github.com/pnp/powershell/pull/3564)
- Added `EnableSensitivityLabelForPDF` to `Set-PnPTenant` and `Get-PnPTenant` [#3581](https://github.com/pnp/powershell/pull/3581)

### Fixed

Expand Down Expand Up @@ -96,6 +97,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).

### Contributors

- Konrad K. [wilecoyotegenius]
- Dan Cecil [danielcecil]
- Antti K. Koskela [koskila]
- Christian Veenhuis [ChVeen]
Expand Down
24 changes: 24 additions & 0 deletions documentation/Set-PnPTenant.md
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ Set-PnPTenant [-SpecialCharactersStateInFileFolderNames <SpecialCharactersState>
[-IncludeAtAGlanceInShareEmails <Boolean>]
[-MassDeleteNotificationDisabled <Boolean>]
[-BusinessConnectivityServiceDisabled <Boolean>]
[-EnableSensitivityLabelForPDF <Boolean>]
[-Force] [-Connection <PnPConnection>]
```

Expand Down Expand Up @@ -297,6 +298,29 @@ Accept pipeline input: False
Accept wildcard characters: False
```

### -EnableSensitivityLabelForPDF
Allows turning on support for PDFs with sensitivity labels for the following scenarios:

- Applying a sensitivity label in Office for the web.
- Uploading a labeled document, and then extracting and displaying that sensitivity label.
- Search, eDiscovery, and data loss prevention.
- Auto-labeling policies and default sensitivity labels for SharePoint document libraries.

The valid values are:
True - Enables support for PDFs.
False (default) - Disables support for PDFs.

```yaml
Type: Boolean
Parameter Sets: (All)

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### -CommentsOnSitePagesDisabled
Disables or enables the commenting functionality on all site pages in the tenant.

Expand Down
9 changes: 9 additions & 0 deletions src/Commands/Admin/SetTenant.cs
Original file line number Diff line number Diff line change
Expand Up @@ -404,6 +404,9 @@ public class SetTenant : PnPAdminCmdlet
[Parameter(Mandatory = false)]
public bool? BusinessConnectivityServiceDisabled { get; set; }

[Parameter(Mandatory = false)]
public bool? EnableSensitivityLabelForPDF { get; set; }

protected override void ExecuteCmdlet()
{
AdminContext.Load(Tenant);
Expand Down Expand Up @@ -1344,6 +1347,12 @@ protected override void ExecuteCmdlet()
modified = true;
}

if (EnableSensitivityLabelForPDF.HasValue)
{
Tenant.EnableSensitivityLabelForPDF = EnableSensitivityLabelForPDF.Value;
modified = true;
}

if (BlockDownloadFileTypePolicy.HasValue)
{
if (!BlockDownloadFileTypePolicy.Value)
Expand Down
11 changes: 11 additions & 0 deletions src/Commands/Model/SPOTenant.cs
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,8 @@ public class SPOTenant

public bool? BusinessConnectivityServiceDisabled { private set; get; }

public bool? EnableSensitivityLabelForPDF { private set; get; }

#endregion

public SPOTenant(Tenant tenant, ClientContext clientContext)
Expand Down Expand Up @@ -642,6 +644,15 @@ public SPOTenant(Tenant tenant, ClientContext clientContext)
OneDriveRequestFilesLinkEnabled = tenant.OneDriveRequestFilesLinkEnabled;
OneDriveRequestFilesLinkExpirationInDays = tenant.OneDriveRequestFilesLinkExpirationInDays;
BusinessConnectivityServiceDisabled = tenant.BusinessConnectivityServiceDisabled;

try
{
EnableSensitivityLabelForPDF = tenant.EnableSensitivityLabelForPDF;
}
catch
{
EnableSensitivityLabelForPDF = false;
}
}
}
}

0 comments on commit b0c852b

Please sign in to comment.