Skip to content
This repository was archived by the owner on Jan 19, 2021. It is now read-only.

Commit

Permalink
Merge pull request #2246 from SharePoint/dev
Browse files Browse the repository at this point in the history
September 2019 Release
  • Loading branch information
erwinvanhunen authored Sep 9, 2019
2 parents 83ad7e8 + a6aadc4 commit a9e2ce6
Show file tree
Hide file tree
Showing 29 changed files with 543 additions and 52 deletions.
Binary file modified Binaries/SharePointPnP.Modernization.Framework.dll
Binary file not shown.
37 changes: 36 additions & 1 deletion Binaries/SharePointPnP.Modernization.Framework.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file modified Binaries/release/SharePointPnP.Modernization.Framework.dll
Binary file not shown.
37 changes: 36 additions & 1 deletion Binaries/release/SharePointPnP.Modernization.Framework.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 17 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,23 @@ All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).

## [3.13.1909.0]

### Added

### Changed

- Added -Label parameter to Add-PnPList and Set-PnPListItem to allow setting a retention label
- ConvertTo-PnPClientSidePage: Added support for skipping the default URL rewriting while still applying any custom URL rewriting if specified (SkipDefaultUrlRewriting parameter)
- ConvertTo-PnPClientSidePage: Added support reverting to the pre September 2019 behaviour for images insides tables/lists. As of September 2019 these images are not created anymore as additional separate image web part since the modern text editor is not dropping the embedded images anymore on edit (AddTableListImageAsImageWebPart parameter)
- Get-PnPSearchCrawlLog: Added switch to show raw crawl log data, as data can change in the back-end. Fixed to show log message.
- Set-PnPTenant: Added switch to set disabled 1st party web parts

### Contributors

- Dan Cecil [danielcecil]
- Koen zomers [KoenZomers]

## [3.12.1908.0]

### Added
Expand Down
8 changes: 8 additions & 0 deletions Commands/Admin/SetTenant.cs
Original file line number Diff line number Diff line change
Expand Up @@ -402,6 +402,9 @@ The only two characters that can be managed at this time are the # and % charact
[Parameter(Mandatory = false, HelpMessage = "Defines if the default themes are visible or hidden")]
public bool? HideDefaultThemes;

[Parameter(Mandatory = false, HelpMessage = "Guids of out of the box modern web part id's to hide")]
public Guid[] DisabledWebPartIds;

protected override void ExecuteCmdlet()
{
ClientContext.Load(Tenant);
Expand Down Expand Up @@ -958,6 +961,11 @@ protected override void ExecuteCmdlet()
Tenant.HideDefaultThemes = HideDefaultThemes.Value;
isDirty = true;
}
if (DisabledWebPartIds != null)
{
Tenant.DisabledWebPartIds = DisabledWebPartIds;
isDirty = true;
}
if (isDirty)
{
ClientContext.ExecuteQueryRetry();
Expand Down
15 changes: 13 additions & 2 deletions Commands/Base/ConnectOnline.cs
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,17 @@ namespace SharePointPnP.PowerShell.Commands.Base
Remarks = "Connects to the Microsoft Graph API using application permissions via an app's declared permission scopes. See https://github.com/SharePoint/PnP-PowerShell/tree/master/Samples/Graph.ConnectUsingAppPermissions for a sample on how to get started.",
SortOrder = 14)]
[CmdletExample(
Code = "PS:> Connect-PnPOnline -Url https://contoso.sharepoint.com -ClientId '<id>' -Tenant 'contoso.onmicrosoft.com' -PEMCertificate <PEM string> -PEMPrivateKey <PEM string>",
Code = "PS:> Connect-PnPOnline -Url https://contoso.sharepoint.com -ClientId '<id>' -Tenant 'contoso.onmicrosoft.com' -CertificatePath c:\\absolute-path\\to\\pnp.pfx -CertificatePassword <if needed>",
Remarks = "Connects to SharePoint using app-only tokens via an app's declared permission scopes. See https://github.com/SharePoint/PnP-PowerShell/tree/master/Samples/SharePoint.ConnectUsingAppPermissions for a sample on how to get started.",
SortOrder = 15)]
[CmdletExample(
Code = "PS:> Connect-PnPOnline -Url https://contoso.sharepoint.com -ClientId '<id>' -Tenant 'contoso.onmicrosoft.com' -Thumbprint 34CFAA860E5FB8C44335A38A097C1E41EEA206AA",
Remarks = "Connects to SharePoint using app-only tokens via an app's declared permission scopes. See https://github.com/SharePoint/PnP-PowerShell/tree/master/Samples/SharePoint.ConnectUsingAppPermissions for a sample on how to get started.",
SortOrder = 16)]
[CmdletExample(
Code = "PS:> Connect-PnPOnline -Url https://contoso.sharepoint.com -ClientId '<id>' -Tenant 'contoso.onmicrosoft.com' -PEMCertificate <PEM string> -PEMPrivateKey <PEM string> -CertificatePassword <if needed>",
Remarks = "Connects to SharePoint using app-only tokens via an app's declared permission scopes. See https://github.com/SharePoint/PnP-PowerShell/tree/master/Samples/SharePoint.ConnectUsingAppPermissions for a sample on how to get started.",
SortOrder = 17)]
#endif
#if ONPREMISES
[CmdletExample(
Expand Down Expand Up @@ -463,7 +471,10 @@ public class ConnectOnline : PSCmdlet
[Parameter(Mandatory = false, ParameterSetName = ParameterSet_APPONLYAAD, HelpMessage = "Ignores any SSL errors. To be used i.e. when connecting to a SharePoint farm using self signed certificates or using a certificate authority not trusted by this machine.")]
[Parameter(Mandatory = false, ParameterSetName = ParameterSet_APPONLYAADPEM, HelpMessage = "Ignores any SSL errors. To be used i.e. when connecting to a SharePoint farm using self signed certificates or using a certificate authority not trusted by this machine.")]
[Parameter(Mandatory = false, ParameterSetName = ParameterSet_APPONLYAADThumb, HelpMessage = "Ignores any SSL errors. To be used i.e. when connecting to a SharePoint farm using self signed certificates or using a certificate authority not trusted by this machine.")]
[Parameter(Mandatory = false, ParameterSetName = ParameterSet_SPOMANAGEMENT, HelpMessage = "Ignores any SSL errors. To be used i.e. when connecting to a SharePoint farm using self signed certificates or using a certificate authority not trusted by this machine.")]
[Parameter(Mandatory = false, ParameterSetName = ParameterSet_GRAPHWITHAAD, HelpMessage = "Ignores any SSL errors. To be used i.e. when connecting through a proxy to the Microsoft Graph API which has SSL interception enabled.")]
[Parameter(Mandatory = false, ParameterSetName = ParameterSet_GRAPHWITHSCOPE, HelpMessage = "Ignores any SSL errors. To be used i.e. when connecting through a proxy to the Microsoft Graph API which has SSL interception enabled.")]
[Parameter(Mandatory = false, ParameterSetName = ParameterSet_GRAPHDEVICELOGIN, HelpMessage = "Ignores any SSL errors. To be used i.e. when connecting through a proxy to the Microsoft Graph API which has SSL interception enabled.")]
[Parameter(Mandatory = false, ParameterSetName = ParameterSet_SPOMANAGEMENT, HelpMessage = "Ignores any SSL errors. To be used i.e. when connecting to a SharePoint farm using self signed certificates or using a certificate authority not trusted by this machine.")]
#endif
#if ONPREMISES
[Parameter(Mandatory = false, ParameterSetName = ParameterSet_HIGHTRUST_CERT, HelpMessage = "Ignores any SSL errors. To be used i.e. when connecting to a SharePoint farm using self signed certificates or using a certificate authority not trusted by this machine.")]
Expand Down
14 changes: 12 additions & 2 deletions Commands/Base/PipeBinds/PagePipeBind.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#if !SP2013 && !SP2016
#if !SP2013 && !SP2016 && !SP2019
using Microsoft.SharePoint.Client;
using OfficeDevPnP.Core.Utilities;
using SharePointPnP.Modernization.Framework.Transform;
using SharePointPnP.PowerShell.Commands.ClientSidePages;
using System;
using System.Linq;
Expand Down Expand Up @@ -56,7 +57,16 @@ internal ListItem GetPage(Web web, string listToLoad)

web.EnsureProperty(w => w.ServerRelativeUrl);
var listServerRelativeUrl = UrlUtility.Combine(web.ServerRelativeUrl, listToLoad);
var libraryContainingPage = web.GetList(listServerRelativeUrl);

List libraryContainingPage = null;
if (BaseTransform.GetVersion(web.Context) == SPVersion.SP2010)
{
libraryContainingPage = web.GetListByName(listToLoad);
}
else
{
libraryContainingPage = web.GetList(listServerRelativeUrl);
}

if (libraryContainingPage != null)
{
Expand Down
19 changes: 16 additions & 3 deletions Commands/Base/PipeBinds/UnifiedGroupPipeBind.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
using OfficeDevPnP.Core.Entities;
using OfficeDevPnP.Core.Framework.Graph;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace SharePointPnP.PowerShell.Commands.Base.PipeBinds
{
Expand Down Expand Up @@ -67,5 +64,21 @@ public UnifiedGroupEntity GetGroup(string accessToken, bool includeClassificatio
}
return group;
}

public UnifiedGroupEntity GetDeletedGroup(string accessToken)
{
UnifiedGroupEntity group = null;

if (Group != null)
{
group = UnifiedGroupsUtility.GetDeletedUnifiedGroup(Group.GroupId, accessToken);
}
else if (!string.IsNullOrEmpty(GroupId))
{
group = UnifiedGroupsUtility.GetDeletedUnifiedGroup(GroupId, accessToken);
}

return group;
}
}
}
Loading

0 comments on commit a9e2ce6

Please sign in to comment.