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:
@@ -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'
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user