mirror of
https://github.com/sasjs/adapter.git
synced 2026-01-15 16:10:06 +00:00
feat(context-delete): restricted system compute context deletion
This commit is contained in:
@@ -422,6 +422,14 @@ export class ContextManager {
|
|||||||
throw new Error('Invalid context name.')
|
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 = {
|
const headers: any = {
|
||||||
'Content-Type': 'application/json'
|
'Content-Type': 'application/json'
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user