ignores accessRequest list templates from backup and restore (#4957)
ignores accessRequest list templates from backup and restore #### Does this PR need a docs update or release note? - [x] ⛔ No #### Type of change <!--- Please check the type of change your PR introduces: ---> - [x] 🌻 Feature #### Issue(s) #4754 #### Test Plan <!-- How will this be tested prior to merging.--> - [x] 💪 Manual - [x] ⚡ Unit test - [x] 💚 E2E
This commit is contained in:
parent
e675ca13d7
commit
7a8c96964c
@ -109,7 +109,7 @@ func (suite *SharePointRestoreSuite) TestListCollection_Restore_invalidListTempl
|
||||
suite.ac,
|
||||
suite.siteID,
|
||||
suite.creds,
|
||||
api.DocumentLibraryListTemplateName)
|
||||
api.DocumentLibraryListTemplate)
|
||||
|
||||
return lrh, destName, mockData
|
||||
},
|
||||
@ -123,7 +123,7 @@ func (suite *SharePointRestoreSuite) TestListCollection_Restore_invalidListTempl
|
||||
suite.ac,
|
||||
suite.siteID,
|
||||
suite.creds,
|
||||
api.WebTemplateExtensionsListTemplateName)
|
||||
api.WebTemplateExtensionsListTemplate)
|
||||
|
||||
return lrh, destName, mockData
|
||||
},
|
||||
|
||||
@ -48,11 +48,12 @@ const (
|
||||
ReadOnlyOrHiddenFieldNamePrefix = "_"
|
||||
DescoratorFieldNamePrefix = "@"
|
||||
|
||||
WebTemplateExtensionsListTemplateName = "webTemplateExtensionsList"
|
||||
WebTemplateExtensionsListTemplate = "webTemplateExtensionsList"
|
||||
// This issue https://github.com/alcionai/corso/issues/4932
|
||||
// tracks to backup/restore supportability of `documentLibrary` templated lists
|
||||
DocumentLibraryListTemplateName = "documentLibrary"
|
||||
SharingLinksListTemplateName = "sharingLinks"
|
||||
DocumentLibraryListTemplate = "documentLibrary"
|
||||
SharingLinksListTemplate = "sharingLinks"
|
||||
AccessRequestsListTemplate = "accessRequest"
|
||||
)
|
||||
|
||||
var addressFieldNames = []string{
|
||||
@ -88,9 +89,10 @@ var readOnlyFieldNames = keys.Set{
|
||||
}
|
||||
|
||||
var SkipListTemplates = keys.Set{
|
||||
WebTemplateExtensionsListTemplateName: {},
|
||||
DocumentLibraryListTemplateName: {},
|
||||
SharingLinksListTemplateName: {},
|
||||
WebTemplateExtensionsListTemplate: {},
|
||||
DocumentLibraryListTemplate: {},
|
||||
SharingLinksListTemplate: {},
|
||||
AccessRequestsListTemplate: {},
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
@ -778,17 +778,22 @@ func (suite *ListsAPIIntgSuite) TestLists_PostList_invalidTemplate() {
|
||||
}{
|
||||
{
|
||||
name: "list with template documentLibrary",
|
||||
template: DocumentLibraryListTemplateName,
|
||||
template: DocumentLibraryListTemplate,
|
||||
expect: assert.Error,
|
||||
},
|
||||
{
|
||||
name: "list with template webTemplateExtensionsList",
|
||||
template: WebTemplateExtensionsListTemplateName,
|
||||
template: WebTemplateExtensionsListTemplate,
|
||||
expect: assert.Error,
|
||||
},
|
||||
{
|
||||
name: "list with template sharingLinks",
|
||||
template: SharingLinksListTemplateName,
|
||||
template: SharingLinksListTemplate,
|
||||
expect: assert.Error,
|
||||
},
|
||||
{
|
||||
name: "list with template accessRequest",
|
||||
template: AccessRequestsListTemplate,
|
||||
expect: assert.Error,
|
||||
},
|
||||
}
|
||||
@ -881,7 +886,7 @@ func getStoredListBytes(t *testing.T, template string) []byte {
|
||||
defer writer.Close()
|
||||
|
||||
overrideListInfo := models.NewListInfo()
|
||||
overrideListInfo.SetTemplate(ptr.To(WebTemplateExtensionsListTemplateName))
|
||||
overrideListInfo.SetTemplate(ptr.To(template))
|
||||
|
||||
_, list := getFieldsDataAndList()
|
||||
list.SetList(overrideListInfo)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user