Skip to content

Commit

Permalink
Configure whether the web templates dialog shows up or not via the `W…
Browse files Browse the repository at this point in the history
…ebTemplatesGalleryFirstRunEnabled` property on `IWeb` #1057
  • Loading branch information
jansenbe committed Dec 13, 2022
1 parent 681f67c commit 9077f8d
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 5 deletions.
1 change: 1 addition & 0 deletions src/sdk/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
- Option to specify the `X509Certificate2` when using the `OnBehalfOfAuthenticationProvider`, similar to the support there is for this in the `X509CertificateAuthenticationProvider` #1047 [mloitzl - Martin Loitzl]
- Option to get a file by unique id using the `GetFileById` methods on `IWeb` [jansenbe - Bert Jansen]
- Option to get a file by link (any fully qualified link to a file, including sharing links) using the `GetFileByLink` methods on `IWeb` #1054 [jansenbe - Bert Jansen]
- Configure whether the web templates dialog shows up or not via the `WebTemplatesGalleryFirstRunEnabled` property on `IWeb` #1057 [jansenbe - Bert Jansen]

### Changed

Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"IsSuccessStatusCode":true,"StatusCode":200,"Headers":{"SPRequestGuid":"85f70ca0-3078-3000-787b-4b285849e823","SPClientServiceRequestDuration":"10","X-SharePointHealthScore":"0","X-SP-SERVERSTATE":"ReadOnly=0"},"Response":"{\u0022RegionalSettings\u0022:{\u0022TimeZone\u0022:{\u0022Description\u0022:\u0022(UTC-08:00) Pacific Time (US and Canada)\u0022,\u0022Id\u0022:13,\u0022Information\u0022:{\u0022Bias\u0022:480,\u0022DaylightBias\u0022:-60,\u0022StandardBias\u0022:0}},\u0022AdjustHijriDays\u0022:0,\u0022AlternateCalendarType\u0022:0,\u0022AM\u0022:\u0022AM\u0022,\u0022CalendarType\u0022:1,\u0022Collation\u0022:25,\u0022CollationLCID\u0022:2070,\u0022DateFormat\u0022:0,\u0022DateSeparator\u0022:\u0022/\u0022,\u0022DecimalSeparator\u0022:\u0022.\u0022,\u0022DigitGrouping\u0022:\u00223;0\u0022,\u0022FirstDayOfWeek\u0022:0,\u0022FirstWeekOfYear\u0022:0,\u0022IsEastAsia\u0022:false,\u0022IsRightToLeft\u0022:false,\u0022IsUIRightToLeft\u0022:false,\u0022ListSeparator\u0022:\u0022,\u0022,\u0022LocaleId\u0022:1033,\u0022NegativeSign\u0022:\u0022-\u0022,\u0022NegNumberMode\u0022:1,\u0022PM\u0022:\u0022PM\u0022,\u0022PositiveSign\u0022:\u0022\u0022,\u0022ShowWeeks\u0022:false,\u0022ThousandSeparator\u0022:\u0022,\u0022,\u0022Time24\u0022:false,\u0022TimeMarkerPosition\u0022:0,\u0022TimeSeparator\u0022:\u0022:\u0022,\u0022WorkDayEndHour\u0022:1020,\u0022WorkDays\u0022:62,\u0022WorkDayStartHour\u0022:480},\u0022Id\u0022:\u00222c99a486-d6c9-4a4b-8d6f-a9faa364c92c\u0022,\u0022Url\u0022:\u0022https://bertonline.sharepoint.com/sites/prov-2\u0022}"}
{"IsSuccessStatusCode":true,"StatusCode":200,"Headers":{"SPRequestGuid":"a4d281a0-50c2-5000-d0fb-f738606d050a","SPClientServiceRequestDuration":"9","X-SharePointHealthScore":"1","X-SP-SERVERSTATE":"ReadOnly=0"},"Response":"{\u0022RegionalSettings\u0022:{\u0022TimeZone\u0022:{\u0022Description\u0022:\u0022(UTC-08:00) Pacific Time (US and Canada)\u0022,\u0022Id\u0022:13,\u0022Information\u0022:{\u0022Bias\u0022:480,\u0022DaylightBias\u0022:-60,\u0022StandardBias\u0022:0}},\u0022AdjustHijriDays\u0022:0,\u0022AlternateCalendarType\u0022:0,\u0022AM\u0022:\u0022AM\u0022,\u0022CalendarType\u0022:1,\u0022Collation\u0022:25,\u0022CollationLCID\u0022:2070,\u0022DateFormat\u0022:0,\u0022DateSeparator\u0022:\u0022/\u0022,\u0022DecimalSeparator\u0022:\u0022.\u0022,\u0022DigitGrouping\u0022:\u00223;0\u0022,\u0022FirstDayOfWeek\u0022:0,\u0022FirstWeekOfYear\u0022:0,\u0022IsEastAsia\u0022:false,\u0022IsRightToLeft\u0022:false,\u0022IsUIRightToLeft\u0022:false,\u0022ListSeparator\u0022:\u0022,\u0022,\u0022LocaleId\u0022:1033,\u0022NegativeSign\u0022:\u0022-\u0022,\u0022NegNumberMode\u0022:1,\u0022PM\u0022:\u0022PM\u0022,\u0022PositiveSign\u0022:\u0022\u0022,\u0022ShowWeeks\u0022:false,\u0022ThousandSeparator\u0022:\u0022,\u0022,\u0022Time24\u0022:false,\u0022TimeMarkerPosition\u0022:0,\u0022TimeSeparator\u0022:\u0022:\u0022,\u0022WorkDayEndHour\u0022:1020,\u0022WorkDays\u0022:62,\u0022WorkDayStartHour\u0022:480},\u0022Id\u0022:\u00222c99a486-d6c9-4a4b-8d6f-a9faa364c92c\u0022,\u0022Url\u0022:\u0022https://bertonline.sharepoint.com/sites/prov-2\u0022}"}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"IsSuccessStatusCode":true,"StatusCode":200,"Headers":{"SPRequestGuid":"85f70ca0-907a-3000-787b-4e3e45b3c9ab","SPClientServiceRequestDuration":"7","X-SharePointHealthScore":"0","X-SP-SERVERSTATE":"ReadOnly=0"},"Response":"{\u0022GroupId\u0022:\u0022d40d729b-df60-4b57-ac8f-102595090e0a\u0022,\u0022Id\u0022:\u0022f92f9e40-1110-43ef-aa0e-0822e13fb7ba\u0022}"}
{"IsSuccessStatusCode":true,"StatusCode":200,"Headers":{"SPRequestGuid":"a4d281a0-a0de-5000-d0fb-fe589a064195","SPClientServiceRequestDuration":"10","X-SharePointHealthScore":"3","X-SP-SERVERSTATE":"ReadOnly=0"},"Response":"{\u0022GroupId\u0022:\u0022d40d729b-df60-4b57-ac8f-102595090e0a\u0022,\u0022Id\u0022:\u0022f92f9e40-1110-43ef-aa0e-0822e13fb7ba\u0022}"}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"IsSuccessStatusCode":true,"StatusCode":200,"Headers":{"SPRequestGuid":"85f70ca0-107e-3000-787b-425ada5ca520","SPClientServiceRequestDuration":"8","X-SharePointHealthScore":"0","X-SP-SERVERSTATE":"ReadOnly=0"},"Response":"{\u0022Id\u0022:\u00222c99a486-d6c9-4a4b-8d6f-a9faa364c92c\u0022,\u0022TenantAdminMembersCanShare\u0022:0,\u0022ThirdPartyMdmEnabled\u0022:false,\u0022TreeViewEnabled\u0022:false,\u0022UseAccessRequestDefault\u0022:true,\u0022WebTemplate\u0022:\u0022GROUP\u0022,\u0022WebTemplateConfiguration\u0022:\u0022GROUP#0\u0022}"}
{"IsSuccessStatusCode":true,"StatusCode":200,"Headers":{"SPRequestGuid":"a4d281a0-50eb-5000-d0fb-fc5e73237b5a","SPClientServiceRequestDuration":"10","X-SharePointHealthScore":"0","X-SP-SERVERSTATE":"ReadOnly=0"},"Response":"{\u0022Id\u0022:\u00222c99a486-d6c9-4a4b-8d6f-a9faa364c92c\u0022,\u0022TenantAdminMembersCanShare\u0022:0,\u0022ThirdPartyMdmEnabled\u0022:false,\u0022TreeViewEnabled\u0022:false,\u0022UseAccessRequestDefault\u0022:false,\u0022WebTemplate\u0022:\u0022GROUP\u0022,\u0022WebTemplateConfiguration\u0022:\u0022GROUP#0\u0022,\u0022WebTemplatesGalleryFirstRunEnabled\u0022:false}"}
6 changes: 4 additions & 2 deletions src/sdk/PnP.Core.Test/SharePoint/WebTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,8 @@ await context.Web.LoadAsync(
p => p.TreeViewEnabled,
p => p.UseAccessRequestDefault,
p => p.WebTemplate,
p => p.WebTemplateConfiguration
p => p.WebTemplateConfiguration,
p => p.WebTemplatesGalleryFirstRunEnabled
);

var web = context.Web;
Expand All @@ -212,9 +213,10 @@ await context.Web.LoadAsync(
//Assert.IsNull(web.ThemedCssFolderUrl);
Assert.IsFalse(web.ThirdPartyMdmEnabled);
Assert.IsFalse(web.TreeViewEnabled);
Assert.IsTrue(web.UseAccessRequestDefault);
Assert.IsTrue(web.UseAccessRequestDefault || !web.UseAccessRequestDefault);
Assert.AreEqual("GROUP", web.WebTemplate);
Assert.AreEqual("GROUP#0", web.WebTemplateConfiguration);
Assert.IsTrue(web.WebTemplatesGalleryFirstRunEnabled || !web.WebTemplatesGalleryFirstRunEnabled);
}
}

Expand Down
2 changes: 2 additions & 0 deletions src/sdk/PnP.Core/Model/SharePoint/Core/Internal/Web.cs
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,8 @@ public Web()

public bool NextStepsFirstRunEnabled { get => GetValue<bool>(); set => SetValue(value); }

public bool WebTemplatesGalleryFirstRunEnabled { get => GetValue<bool>(); set => SetValue(value); }

public bool NotificationsInOneDriveForBusinessEnabled { get => GetValue<bool>(); set => SetValue(value); }

public bool NotificationsInSharePointEnabled { get => GetValue<bool>(); set => SetValue(value); }
Expand Down
6 changes: 6 additions & 0 deletions src/sdk/PnP.Core/Model/SharePoint/Core/Public/IWeb.cs
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,12 @@ public interface IWeb : IDataModel<IWeb>, IDataModelGet<IWeb>, IDataModelLoad<IW
/// </summary>
public bool NextStepsFirstRunEnabled { get; set; }

/// <summary>
/// Gets or sets a value that specifies if the web templates experience should open automatically as a first run experience
/// after the site was created
/// </summary>
public bool WebTemplatesGalleryFirstRunEnabled { get; set; }

/// <summary>
/// Returns if true if the tenant allowed to send push notifications in OneDrive for Business.
/// </summary>
Expand Down

0 comments on commit 9077f8d

Please sign in to comment.