You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// `namespaces` should only exist in the expectedResult.value if the type is multi-namespace.
1021
-
if(namespaces){
1022
-
// in the bulk operation, one cannot specify a namespace from which to delete an object other than the namespace that the operation is performed in.
1023
-
// If a multinamespace object exists in more than the current space (from which the call is made), force deleting the object will delete it from all namespaces it exists in.
1024
-
// In that case, all legacy url aliases are deleted as well. If force isn't applied, the operation fails and the object isn't deleted.
1025
-
awaitdeleteLegacyUrlAliases({
1026
-
mappings: this._mappings,
1027
-
registry: this._registry,
1028
-
client: this.client,
1029
-
getIndexForType: this.getIndexForType.bind(this),
1030
-
type,
1031
-
id,
1032
-
...(namespaces.includes(ALL_NAMESPACES_STRING)
1033
-
? {namespaces: [],deleteBehavior: 'exclusive'}// delete legacy URL aliases for this type/ID for all spaces not in []. Effectively, it's the same behavior ad inludisve with a defined array of namespaces.
1034
-
: { namespaces,deleteBehavior: 'inclusive'}),// delete legacy URL aliases for this type/ID for these specific spaces. In the bulk operation, this behavior is only applicable in the case of multi-namespace isolated types.
1035
-
}).catch((err)=>{
1036
-
// The object has already been deleted, but we caught an error when attempting to delete aliases.
1037
-
// A consumer cannot attempt to delete the object again, so just log the error and swallow it.
1038
-
this._logger.error(
1039
-
`Unable to delete aliases when deleting an object: ${err.message}`
Copy file name to clipboardExpand all lines: packages/core/saved-objects/core-saved-objects-api-server-internal/src/lib/repository_bulk_delete_internal_types.ts
0 commit comments