Skip to content

Commit 92347d0

Browse files
committed
Adding AUTH0_ALLOW_DELETE condition before deleting the scim_configuration
1 parent 8ce7ab4 commit 92347d0

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/tools/auth0/handlers/scimHandler.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,12 @@ export default class ScimHandler {
199199
if (scimBodyParams) {
200200
await this.updateScimConfiguration(requestParams, scimBodyParams);
201201
} else {
202-
await this.deleteScimConfiguration(requestParams);
202+
if (this.config('AUTH0_ALLOW_DELETE')) {
203+
log.warn(`Deleting scim_configuration on connection ${ requestParams.id }.`);
204+
await this.deleteScimConfiguration(requestParams);
205+
} else {
206+
log.debug('Skipping DELETE scim_configuration. Enable deletes by setting AUTH0_ALLOW_DELETE to true in your config.');
207+
}
203208
}
204209
} else if (scimBodyParams) {
205210
await this.createScimConfiguration(requestParams, scimBodyParams);

0 commit comments

Comments
 (0)