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

Update ObjectFiles.cs #2696

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -182,13 +182,6 @@ public override TokenParser ProvisionObjects(Web web, ProvisioningTemplate templ
}
#endif

//Set Properties before Checkin
if (file.Properties != null && file.Properties.Any())
{
Dictionary<string, string> transformedProperties = file.Properties.ToDictionary(property => property.Key, property => parser.ParseString(property.Value));
SetFileProperties(targetFile, transformedProperties, parser, false);
}

switch (file.Level)
{
case Model.FileLevel.Published:
Expand Down Expand Up @@ -218,6 +211,12 @@ public override TokenParser ProvisionObjects(Web web, ProvisioningTemplate templ
{
targetFile.ListItemAllFields.SetSecurity(parser, file.Security);
}

if (file.Properties != null && file.Properties.Any())
{
Dictionary<string, string> transformedProperties = file.Properties.ToDictionary(property => property.Key, property => parser.ParseString(property.Value));
SetFileProperties(targetFile, transformedProperties, parser, false);
}
}

web = originalWeb; // restore context in case files are provisioned to the master page gallery #1059
Expand Down Expand Up @@ -377,4 +376,4 @@ private static File UploadFile(Microsoft.SharePoint.Client.Folder folder, Stream
return targetFile;
}
}
}
}