1
0
mirror of https://github.com/sasjs/adapter.git synced 2025-12-11 01:14:36 +00:00

feat(context-delete): restricted system compute context deletion

This commit is contained in:
Yury Shkoda
2020-12-29 11:42:14 +03:00
parent 362078b12c
commit a383388e54

View File

@@ -422,6 +422,14 @@ export class ContextManager {
throw new Error('Invalid context name.')
}
if (this.defaultComputeContexts.includes(contextName)) {
throw new Error(
`Deleting default SAS compute contexts is not allowed.\nDefault contexts:${this.defaultComputeContexts.map(
(context, i) => `\n${i + 1}. ${context}`
)}`
)
}
const headers: any = {
'Content-Type': 'application/json'
}